From 8466d1e20d7452d8341b756438808fadb35f1db5 Mon Sep 17 00:00:00 2001 From: Crazypersonalph <93847055+Crazypersonalph@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:51:10 +0800 Subject: [PATCH] hacky solution deployed --- interface/src/components/ThemeSelector.tsx | 1 - src/SEQTA.ts | 11 +++-------- 2 files changed, 3 insertions(+), 9 deletions(-) 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 4649c305..c692ecb8 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -688,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) { @@ -778,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); } }