Skip to content

Commit

Permalink
Revert "."
Browse files Browse the repository at this point in the history
This reverts commit 8a79e06.
  • Loading branch information
MotorTruck1221 committed Jan 15, 2025
1 parent 8a79e06 commit 8240668
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/components/settings/Loader.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script>
<<<<<<< HEAD
import { EventHandler } from "@utils/events";
import { SW, createProxyScripts, checkProxyScripts, createBareMuxConn, setTransport } from "@utils/serviceWorker";
import { Settings } from "@utils/settings";
Expand Down Expand Up @@ -65,30 +64,6 @@
}
},
logging: true
=======
import { settings, Settings } from "@utils/settings/index";
import { loadProxyScripts, setTransport, initSw, setSWStuff } from "@utils/registerSW";
// This loads the settings in a nice way
settings.tabSettings.cloakTab(localStorage.getItem(Settings.TabSettings.tabCloak) as string || "default");
settings.proxySettings.changeProxy(localStorage.getItem(Settings.ProxySettings.proxy) as string || "automatic");
settings.proxySettings.openIn(localStorage.getItem(Settings.ProxySettings.openIn) as string || "embed");
settings.proxySettings.setSearchEngine(localStorage.getItem(Settings.ProxySettings.searchEngine) as string || "ddg");
settings.proxySettings.setWispURL(localStorage.getItem(Settings.ProxySettings.wispServerURL) as string || "default");
settings.proxySettings.setTransport(localStorage.getItem(Settings.ProxySettings.transport) as string || "libcurl");
settings.marketPlaceSettings.changeTheme(false, undefined, localStorage.getItem(Settings.AppearanceSettings.video) as string, localStorage.getItem(Settings.AppearanceSettings.image) as string, localStorage.getItem(Settings.AppearanceSettings.themeName) as string);
document.addEventListener("astro:after-swap", function() {
settings.tabSettings.cloakTab(localStorage.getItem(Settings.TabSettings.tabCloak) as string || "default");
//settings.marketPlaceSettings.changeTheme(false);
});
document.addEventListener("DOMContentLoaded", async () => {
const conn = await loadProxyScripts();
await setTransport(
conn,
localStorage.getItem(Settings.ProxySettings.transport) as string
);
const sw = await initSw();
await setSWStuff({sw: sw.sw, conn, sj: sw.sj });
>>>>>>> parent of 2c4ea3e (Stupid types)
});
//bind the events
eventHandler.bind();
Expand Down

0 comments on commit 8240668

Please sign in to comment.