summaryrefslogtreecommitdiff
path: root/popup/popup.js
diff options
context:
space:
mode:
Diffstat (limited to 'popup/popup.js')
-rw-r--r--popup/popup.js31
1 files changed, 4 insertions, 27 deletions
diff --git a/popup/popup.js b/popup/popup.js
index a35a8cd..9b2cd29 100644
--- a/popup/popup.js
+++ b/popup/popup.js
@@ -687,17 +687,6 @@ new (class ExtensionPopup {
console.log("Fetching styles from:", repositoryUrl);
- // Store existing site-specific settings before fetching new styles
- const allStorageData = await browser.storage.local.get(null);
- const existingSiteSettings = {};
-
- // Identify and keep all site-specific settings
- for (const [key, value] of Object.entries(allStorageData)) {
- if (key.startsWith(this.BROWSER_STORAGE_KEY + ".")) {
- existingSiteSettings[key] = value;
- }
- }
-
const response = await fetch(repositoryUrl, {
headers: {
"Cache-Control": "no-cache",
@@ -742,24 +731,12 @@ new (class ExtensionPopup {
// Update labels
this.updateModeLabels();
} else {
- // Just update the lastFetchedTime while preserving other settings
- const updatedSettings = {
- ...settingsData[this.BROWSER_STORAGE_KEY],
- lastFetchedTime: Date.now(),
- };
- await browser.storage.local.set({
- [this.BROWSER_STORAGE_KEY]: updatedSettings,
- });
+ // Just update the lastFetchedTime
+ await browser.storage.local.set({ lastFetchedTime: Date.now() });
}
- // Reload the current site features
- await this.loadCurrentSiteFeatures();
-
- // Notify background script to immediately reapply CSS to active tabs
- browser.runtime.sendMessage({
- action: "reapplyStylesAfterFetch",
- preserveSettings: true,
- });
+ this.loadCurrentSiteFeatures();
+ this.updateActiveTabStyling();
this.refetchCSSButton.textContent = "Done!";
setTimeout(() => {