mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-04-26 08:18:59 -05:00
Hide unnecessary scrollbars in SplatNet 3
https://github.com/samuelthomas2774/nxapi/issues/24
This commit is contained in:
parent
6f84981018
commit
e5fe9b389e
|
|
@ -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<HTMLElement>('.refresh-button');
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,25 @@ 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', () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user