Fix loader on feb 22 2023 beta

This commit is contained in:
AAGaming
2023-02-22 22:00:23 -05:00
parent 611245aec9
commit 97bb3fa4c8
13 changed files with 37 additions and 43 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
import { getFocusNavController } from '../../../../lib/dist';
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
return getFocusNavController().m_ActiveContext.m_rgGamepadNavigationTrees.find((x: any) => x.m_ID == 'root_1_').Root
.Element.ownerDocument.defaultView;
}