diff --git a/src/api/splatnet3-types.ts b/src/api/splatnet3-types.ts index f2572bc..05f3a0e 100644 --- a/src/api/splatnet3-types.ts +++ b/src/api/splatnet3-types.ts @@ -988,7 +988,7 @@ export interface VsHistoryDetailPagerRefetchQueryResult { id: string; }; } - + /** cd82f2ade8aca7687947c5f3210805a6 VsHistoryDetailQuery */ export interface VsHistoryDetailResult { vsHistoryDetail: VsHistoryDetail; diff --git a/src/app/preload-webservice/quirks/splatnet2.ts b/src/app/preload-webservice/quirks/splatnet2.ts index f1ac508..439f302 100644 --- a/src/app/preload-webservice/quirks/splatnet2.ts +++ b/src/app/preload-webservice/quirks/splatnet2.ts @@ -6,6 +6,21 @@ const debug = createDebug('app:preload-webservice:quirks:splatnet2'); const SPLATNET2_WEBSERVICE_ID = 5741031244955648; if (webservice.id === SPLATNET2_WEBSERVICE_ID) { + const style = window.document.createElement('style'); + + style.textContent = ` + .popup-dim { + /* Hide the horizonal scroll bar that only appears during the popup animation */ + overflow-x: hidden; + } + `; + + document.addEventListener('DOMContentLoaded', () => { + // Always show the scroll bar for the document root since no scrollable containers are used anywhere + (document.scrollingElement as HTMLElement).style.overflowY = 'scroll'; + window.document.head.appendChild(style); + }); + events.on('window:refresh', () => { const refresh_button = document.querySelector('.refresh-button'); diff --git a/src/app/preload-webservice/quirks/splatnet3.ts b/src/app/preload-webservice/quirks/splatnet3.ts index be46b3d..aac6bac 100644 --- a/src/app/preload-webservice/quirks/splatnet3.ts +++ b/src/app/preload-webservice/quirks/splatnet3.ts @@ -12,12 +12,31 @@ if (webservice.id === SPLATNET3_WEBSERVICE_ID) { [class*=NavigationBar_exitButton] { display: none; } + + [class*=App_App] { + /* Hide scroll bars in the main app container, which includes the title bar that should always be fixed */ + overflow: auto; + } + [class*=InAppContent_children] { + /* Maybe hide scroll bars in the main content container */ + overflow-y: auto; + /* Hide the horizonal scroll bar that only appears during the page sliding transition */ + overflow-x: hidden; + } + [class*=SwipableView_swipableViewItem] { + /* Maybe hide scroll bars in swipable views (e.g. in the schedules page) */ + overflow-y: auto; + } + [class*=StyledModal_Container] { + /* Maybe hide the scroll bar in modals */ + overflow-y: auto; + } `; document.addEventListener('DOMContentLoaded', () => { window.document.head.appendChild(style); }); - + events.on('window:refresh', () => { const pulltorefresh_container = document.querySelector('[class*=PullToRefresh_container]'); debug('PullToRefresh container HTMLElement', pulltorefresh_container); @@ -27,7 +46,7 @@ if (webservice.id === SPLATNET3_WEBSERVICE_ID) { const react_fiber: any = pulltorefresh_container[keys.find(k => k.startsWith('__reactFiber$'))!]; debug('PullToRefresh container React fiber', react_fiber); if (!react_fiber) return location.reload(); - + try { const props = react_fiber.return.return.memoizedProps; debug('PullToRefresh root props', props); diff --git a/src/common/users.ts b/src/common/users.ts index 8c73b21..99f0610 100644 --- a/src/common/users.ts +++ b/src/common/users.ts @@ -62,7 +62,7 @@ export default class Users { ]); const user = new CoralUser(nso, data, announcements, friends, webservices, active_event); - + if (store) { await maybeUpdateWebServicesListCache(cached_webservices, store, data.user, webservices); user.onUpdatedWebServices = webservices => {