diff --git a/interface/src/components/ThemeSelector.tsx b/interface/src/components/ThemeSelector.tsx index dfee00cd..b9fdc5a9 100644 --- a/interface/src/components/ThemeSelector.tsx +++ b/interface/src/components/ThemeSelector.tsx @@ -23,7 +23,6 @@ const ThemeSelector = ({ selectedType, setSelectedType, isEditMode }: ThemeSelec useEffect(() => { const initializeThemes = async () => { const downloaded = (await listThemes()); - const initializedThemes = themesList.map(theme => ({ ...theme, isDownloaded: downloaded.themes.includes(theme.name), diff --git a/src/SEQTA.ts b/src/SEQTA.ts index cc5c587c..c692ecb8 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -438,11 +438,13 @@ function CheckiFrameItems() { 'iframe.css', ) ) { - innerHTMLNode.appendChild( + innerHTMLNode.append( fileref, ); } - added_node.addEventListener('load', function () { + node.addEventListener('load', function () { + const childNode = node.contentDocument!.documentElement.childNodes[1] as HTMLElement + const innerHTMLNode = node.contentDocument!.documentElement.firstChild! as HTMLElement if ( childNode.style .color != 'white' @@ -455,7 +457,7 @@ function CheckiFrameItems() { 'iframe.css', ) ) { - innerHTMLNode.appendChild( + innerHTMLNode.append( fileref, ); } @@ -638,11 +640,14 @@ function CheckNoticeTextColour(notice: any) { DarkMode = result.DarkMode; if (node.classList.contains('notice')) { var hex = node.style.cssText.split(' ')[1]; - var threshold = GetThresholdOfColor(hex); + if (hex) { + const hex1 = hex.slice(0,-1) + var threshold = GetThresholdOfColor(hex1); if (DarkMode && threshold < 100) { node.style.cssText = '--color: undefined;'; } } + } } result.then(open, onError) }); @@ -683,7 +688,7 @@ export function tryLoad() { true, ); const observer = new MutationObserver(() => { documentTextColor() }) - observer.observe(document.getElementById('toolbar')!, { attributes: true, childList: true, subtree: true }) + observer.observe(document!, { attributes: true, childList: true, subtree: true, attributeFilter: ['td'], }) } function ChangeMenuItemPositions(storage: any) { @@ -773,16 +778,11 @@ function main(storedSetting: any) { if (onoff) { console.log('[BetterSEQTA+] Enabled'); initialize(); - - if (!isChrome || isChrome === 'undefined') { - tryLoad(); - } + tryLoad(); window.addEventListener('load', tryLoad); } else { - if (!isChrome || isChrome === 'undefined') { - handleDisabled(); - } + handleDisabled() window.addEventListener('load', handleDisabled); } } diff --git a/src/css/injected.scss b/src/css/injected.scss index b9274fb1..7539d1ac 100644 --- a/src/css/injected.scss +++ b/src/css/injected.scss @@ -59,7 +59,6 @@ html { border-radius: 10px !important; cursor: pointer; background: var(--text-primary) !important; - border-radius: 10px; color: var(--theme-primary) !important; height: 35px; justify-content: center; @@ -132,7 +131,7 @@ html { min-height: unset !important; .title { - padding: 1rem 1rem !important; + padding: 1rem !important; } } } @@ -761,7 +760,6 @@ div > ol:has(.uiFileHandlerWrapper) { } .home-container h1 { text-align: center; - font-weight: 400; font-size: 3em !important; font-weight: 300; margin: 0 auto; @@ -955,12 +953,11 @@ div > ol:has(.uiFileHandlerWrapper) { font-weight: 200; } .notice h6 { - margin: 0px 0px 40px 0px; + margin: 0px 0px 40px; font-weight: 100; color: #c9c9c9; } .day { - box-shadow: inset 0px 0px 10px 0.1px var(--better-sub); width: 100%; display: flex; flex-direction: column; @@ -1051,7 +1048,7 @@ div > ol:has(.uiFileHandlerWrapper) { width: 20px; padding: 10px; text-align: center; - margin: 20px auto 0px auto; + margin: 20px auto 0px; cursor: pointer; } @@ -2126,7 +2123,6 @@ li.MessageList__unread___3imtO { overflow-y: hidden; } .upcoming-checkbox-container { - display: block; position: relative; padding: none !important; padding-left: 25px !important; @@ -2213,7 +2209,6 @@ li.MessageList__unread___3imtO { cursor: pointer; } .day { - box-shadow: inset 0px 0px 10px 0.1px var(--better-sub); width: 100%; display: flex; flex-direction: column; @@ -2287,7 +2282,6 @@ li.MessageList__unread___3imtO { } .upcoming-items { background: var(--background-primary); - transition: 200ms; width: 100%; max-height: 55em; overflow-y: auto; @@ -2375,7 +2369,6 @@ li.MessageList__unread___3imtO { overflow-y: hidden; } .upcoming-checkbox-container { - display: block; position: relative; padding: none !important; padding-left: 25px !important;