diff options
| author | AAGaming <aagaming@riseup.net> | 2024-05-29 21:01:49 -0400 |
|---|---|---|
| committer | AAGaming <aagaming@riseup.net> | 2024-05-29 21:01:49 -0400 |
| commit | 2b4e3318ca2d221656d862a6524b076da820b78b (patch) | |
| tree | b38d17ff42ed95a5f0bdedf02b82a14425e7d386 /backend | |
| parent | b84dcd99adbffcc2710fb916c35f698dc57fea2c (diff) | |
| download | decky-loader-2b4e3318ca2d221656d862a6524b076da820b78b.tar.gz decky-loader-2b4e3318ca2d221656d862a6524b076da820b78b.zip | |
fix latest betav2.12.1-pre1
VALVEEEEE
Diffstat (limited to 'backend')
| -rw-r--r-- | backend/src/main.py | 2 | ||||
| -rw-r--r-- | backend/src/utilities.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/backend/src/main.py b/backend/src/main.py index ca6eef58..d83bc542 100644 --- a/backend/src/main.py +++ b/backend/src/main.py @@ -161,7 +161,7 @@ class PluginManager: if first: if await tab.has_global_var("deckyHasLoaded", False): await close_old_tabs() - await tab.evaluate_js("try{if (window.deckyHasLoaded){setTimeout(() => location.reload(), 100)}else{window.deckyHasLoaded = true;(async()=>{try{while(!window.SP_REACT){await new Promise(r => setTimeout(r, 10))};await import('http://localhost:1337/frontend/index.js')}catch(e){console.error(e)};})();}}catch(e){console.error(e)}", False, False, False) + await tab.evaluate_js("try{if (window.deckyHasLoaded){setTimeout(() => SteamClient.Browser.RestartJSContext(), 100)}else{window.deckyHasLoaded = true;(async()=>{try{while(!window.webpackChunksteamui){await new Promise(r => setTimeout(r, 10))};await import('http://localhost:1337/frontend/index.js')}catch(e){console.error(e)};})();}}catch(e){console.error(e)}", False, False, False) except: logger.info("Failed to inject JavaScript into tab\n" + format_exc()) pass diff --git a/backend/src/utilities.py b/backend/src/utilities.py index edde682d..c11df0bf 100644 --- a/backend/src/utilities.py +++ b/backend/src/utilities.py @@ -360,7 +360,7 @@ class Utilities: tab = await get_gamepadui_tab() self.rdt_script_id = None await close_old_tabs() - await tab.evaluate_js("location.reload();", False, True, False) + await tab.evaluate_js("SteamClient.Browser.RestartJSContext();", False, True, False) self.logger.info("React DevTools disabled") async def get_user_info(self) -> Dict[str, str]: |
