|
1 | 1 | <script> |
2 | | -<<<<<<< HEAD |
3 | 2 | import { EventHandler } from "@utils/events"; |
4 | 3 | import { SW, createProxyScripts, checkProxyScripts, createBareMuxConn, setTransport } from "@utils/serviceWorker"; |
5 | 4 | import { Settings } from "@utils/settings"; |
|
65 | 64 | } |
66 | 65 | }, |
67 | 66 | logging: true |
68 | | -======= |
69 | | - import { settings, Settings } from "@utils/settings/index"; |
70 | | - import { loadProxyScripts, setTransport, initSw, setSWStuff } from "@utils/registerSW"; |
71 | | - // This loads the settings in a nice way |
72 | | - settings.tabSettings.cloakTab(localStorage.getItem(Settings.TabSettings.tabCloak) as string || "default"); |
73 | | - settings.proxySettings.changeProxy(localStorage.getItem(Settings.ProxySettings.proxy) as string || "automatic"); |
74 | | - settings.proxySettings.openIn(localStorage.getItem(Settings.ProxySettings.openIn) as string || "embed"); |
75 | | - settings.proxySettings.setSearchEngine(localStorage.getItem(Settings.ProxySettings.searchEngine) as string || "ddg"); |
76 | | - settings.proxySettings.setWispURL(localStorage.getItem(Settings.ProxySettings.wispServerURL) as string || "default"); |
77 | | - settings.proxySettings.setTransport(localStorage.getItem(Settings.ProxySettings.transport) as string || "libcurl"); |
78 | | - 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); |
79 | | - document.addEventListener("astro:after-swap", function() { |
80 | | - settings.tabSettings.cloakTab(localStorage.getItem(Settings.TabSettings.tabCloak) as string || "default"); |
81 | | - //settings.marketPlaceSettings.changeTheme(false); |
82 | | - }); |
83 | | - document.addEventListener("DOMContentLoaded", async () => { |
84 | | - const conn = await loadProxyScripts(); |
85 | | - await setTransport( |
86 | | - conn, |
87 | | - localStorage.getItem(Settings.ProxySettings.transport) as string |
88 | | - ); |
89 | | - const sw = await initSw(); |
90 | | - await setSWStuff({sw: sw.sw, conn, sj: sw.sj }); |
91 | | ->>>>>>> parent of 2c4ea3e (Stupid types) |
92 | 67 | }); |
93 | 68 | //bind the events |
94 | 69 | eventHandler.bind(); |
|
0 commit comments