mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 23:32:00 +00:00
fix injecting twice
This commit is contained in:
@@ -98,6 +98,7 @@ class PluginManager:
|
|||||||
#await inject_to_tab("SP", "window.syncDeckyPlugins();")
|
#await inject_to_tab("SP", "window.syncDeckyPlugins();")
|
||||||
|
|
||||||
async def loader_reinjector(self):
|
async def loader_reinjector(self):
|
||||||
|
await sleep(5)
|
||||||
while True:
|
while True:
|
||||||
await sleep(5)
|
await sleep(5)
|
||||||
if not await tab_has_global_var("SP", "deckyHasLoaded"):
|
if not await tab_has_global_var("SP", "deckyHasLoaded"):
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ declare global {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
(async () => {
|
(async () => {
|
||||||
|
window.deckyHasLoaded = true;
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
window.deckyAuthToken = await fetch('http://127.0.0.1:1337/auth/token').then((r) => r.text());
|
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);
|
setTimeout(() => window.syncDeckyPlugins(), 5000);
|
||||||
|
|
||||||
window.deckyHasLoaded = true;
|
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user