diff --git a/src/SEQTA.ts b/src/SEQTA.ts index 60a6b6a7..92bae369 100644 --- a/src/SEQTA.ts +++ b/src/SEQTA.ts @@ -59,10 +59,6 @@ async function init() { IsSEQTAPage = true; console.info("[BetterSEQTA+] Verified SEQTA Page"); - if (typeof window !== "undefined" && window === window.top) { - void browser.runtime.sendMessage({ type: "cloudSettingsPoll" }).catch(() => {}); - } - registerFetchSeqtaAppLinkListener(); const documentLoadStyle = document.createElement("style"); diff --git a/src/plugins/built-in/themes/theme-manager.ts b/src/plugins/built-in/themes/theme-manager.ts index 2260e8df..b3bc490a 100644 --- a/src/plugins/built-in/themes/theme-manager.ts +++ b/src/plugins/built-in/themes/theme-manager.ts @@ -680,9 +680,17 @@ export class ThemeManager { * Compare installed store themes to GET /api/themes and refresh when the server is newer. * Skips themes with userEdited: true (theme creator / popup save, or custom accent vs default). */ + private static STORE_CHECK_KEY = "bsplus_lastStoreThemeCheck"; + private static STORE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; // 24 hours + public async checkStoreThemeUpdates(): Promise { if (this.storeUpdateCheckRunning) return; + + const lastCheck = Number(localStorage.getItem(ThemeManager.STORE_CHECK_KEY) || 0); + if (Date.now() - lastCheck < ThemeManager.STORE_CHECK_INTERVAL_MS) return; + this.storeUpdateCheckRunning = true; + localStorage.setItem(ThemeManager.STORE_CHECK_KEY, String(Date.now())); try { const token = await cloudAuth.getStoredToken(); const res = (await browser.runtime.sendMessage({