fix injecting twice

This commit is contained in:
AAGaming
2022-08-13 11:57:52 -04:00
parent 99cda2907d
commit 84a19203c5
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -98,6 +98,7 @@ class PluginManager:
#await inject_to_tab("SP", "window.syncDeckyPlugins();")
async def loader_reinjector(self):
await sleep(5)
while True:
await sleep(5)
if not await tab_has_global_var("SP", "deckyHasLoaded"):
+1 -2
View File
@@ -14,6 +14,7 @@ declare global {
}
}
(async () => {
window.deckyHasLoaded = true;
await sleep(1000);
window.deckyAuthToken = await fetch('http://127.0.0.1:1337/auth/token').then((r) => r.text());
@@ -38,6 +39,4 @@ declare global {
};
setTimeout(() => window.syncDeckyPlugins(), 5000);
window.deckyHasLoaded = true;
})();