2022-12-12 16:41:31 +01:00
|
|
|
import './index.css';
|
2023-04-10 15:41:42 +02:00
|
|
|
import './cloak-mode.css';
|
2024-06-14 02:34:50 +02:00
|
|
|
import './polyfills';
|
|
|
|
|
2024-03-04 12:38:46 +01:00
|
|
|
// Polyfill needed for Firefox < 122
|
|
|
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1423593
|
2024-03-25 12:31:25 +01:00
|
|
|
// import '@formatjs/intl-segmenter/polyfill';
|
2022-12-12 16:41:31 +01:00
|
|
|
import { render } from 'preact';
|
2023-01-20 17:23:59 +01:00
|
|
|
import { HashRouter } from 'react-router-dom';
|
2022-12-10 10:14:48 +01:00
|
|
|
|
2022-12-12 16:41:31 +01:00
|
|
|
import { App } from './app';
|
|
|
|
|
|
|
|
if (import.meta.env.DEV) {
|
|
|
|
import('preact/debug');
|
|
|
|
}
|
2022-12-10 10:14:48 +01:00
|
|
|
|
2023-01-20 17:23:59 +01:00
|
|
|
render(
|
|
|
|
<HashRouter>
|
|
|
|
<App />
|
|
|
|
</HashRouter>,
|
|
|
|
document.getElementById('app'),
|
|
|
|
);
|
2023-01-11 02:47:46 +01:00
|
|
|
|
2023-02-02 10:29:57 +01:00
|
|
|
// Storage cleanup
|
2023-01-11 02:47:46 +01:00
|
|
|
setTimeout(() => {
|
|
|
|
try {
|
2023-02-02 10:29:57 +01:00
|
|
|
// Clean up iconify localStorage
|
2023-01-11 02:47:46 +01:00
|
|
|
Object.keys(localStorage).forEach((key) => {
|
|
|
|
if (key.startsWith('iconify')) {
|
|
|
|
localStorage.removeItem(key);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
Object.keys(sessionStorage).forEach((key) => {
|
|
|
|
if (key.startsWith('iconify')) {
|
|
|
|
sessionStorage.removeItem(key);
|
|
|
|
}
|
|
|
|
});
|
2023-02-02 10:29:57 +01:00
|
|
|
|
|
|
|
// Clean up old settings key
|
|
|
|
localStorage.removeItem('settings:boostsCarousel');
|
2023-01-11 02:47:46 +01:00
|
|
|
} catch (e) {}
|
|
|
|
}, 5000);
|
2023-04-10 15:41:42 +02:00
|
|
|
|
|
|
|
window.__CLOAK__ = () => {
|
|
|
|
document.body.classList.toggle('cloak');
|
|
|
|
};
|