305b7a26b0
Co-authored-by: Cobalt-60 <plastics-eater@users.noreply.github.com>
20 lines
699 B
JavaScript
20 lines
699 B
JavaScript
if (window.self === window.top) {
|
|
document.body.style.display = 'none';
|
|
|
|
fetch('/404')
|
|
.then(res => res.text())
|
|
.then(data => {
|
|
document.documentElement.innerHTML = data;
|
|
document.body.style.display = 'none';
|
|
|
|
try { document.body.dataset.theme = JSON.parse(localStorage.getItem('settings')).theme || 'system-default'; }
|
|
catch {
|
|
document.body.dataset.theme = 'system-default';
|
|
sessionStorage.setItem('settings', JSON.stringify({
|
|
theme: 'system-default'
|
|
}));
|
|
}
|
|
|
|
setTimeout(() => document.body.style.display = 'block', 400);
|
|
});
|
|
} |