mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
fix (boot): cleanup boot section
This commit is contained in:
parent
45b8fd99e5
commit
2888cc5f99
1 changed files with 0 additions and 4 deletions
|
|
@ -42,7 +42,6 @@ async function setup_xdg_open() {
|
|||
async function setup_device() {
|
||||
const className = "ontouchstart" in window ? "touch-yes" : "touch-no";
|
||||
document.body.classList.add(className);
|
||||
|
||||
if (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) {
|
||||
document.body.classList.add("dark-mode");
|
||||
}
|
||||
|
|
@ -81,16 +80,13 @@ async function setup_polyfill() {
|
|||
|
||||
async function verify_origin(config) {
|
||||
const origin = config["origin"];
|
||||
|
||||
// happy path
|
||||
if (!origin) return;
|
||||
else if (location.origin === origin) return;
|
||||
|
||||
// non happy path
|
||||
const u = new URL(origin);
|
||||
if (u.host === location.host) return;
|
||||
else if (u.hostname === location.hostname) return;
|
||||
|
||||
setTimeout(() => {
|
||||
location.href = origin + location.pathname + location.search;
|
||||
}, 1000);
|
||||
|
|
|
|||
Loading…
Reference in a new issue