mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-06-13 12:15:09 +03:00
fix injecting twice
This commit is contained in:
@@ -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"):
|
||||
|
||||
@@ -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;
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user