From 84c3b039c385ad872bb0f22eba7a3d2cd4a5ea10 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Mon, 24 Oct 2022 19:14:56 -0400 Subject: preview 10/21/2022 fixes (#234) * initial fixes: everything working except toasts and patch notes * tabshook changes, disable toaster for now * prettier * oops * implement custom toaster because I am tired of Valve's shit also fix QAM not injecting sometimes * remove extra logging * add findSP, fix patch notes, fix vscode screwup * fix patch notes * show error when plugin frontends fail to load * add get_tab_lambda * add css and has_element helpers to Tab * small modals fixup * Don't forceUpdate QuickAccess on stable * add routes prop used to get tabs component * add more dev utils to DFL global --- frontend/src/utils/windows.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 frontend/src/utils/windows.ts (limited to 'frontend/src/utils') diff --git a/frontend/src/utils/windows.ts b/frontend/src/utils/windows.ts new file mode 100644 index 00000000..2b5181d8 --- /dev/null +++ b/frontend/src/utils/windows.ts @@ -0,0 +1,7 @@ +export function findSP(): Window { + // old (SP as host) + if (document.title == 'SP') return window; + // new (SP as popup) + return FocusNavController.m_ActiveContext.m_rgGamepadNavigationTrees.find((x: any) => x.m_ID == 'root_1_').Root + .Element.ownerDocument.defaultView; +} -- cgit v1.2.3