aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/background
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2022-06-20 16:47:49 +0300
committerManeraKai <manerakai@protonmail.com>2022-06-20 16:47:49 +0300
commited84d92598ff622a9f5a88ef0ce61e01e1598c2c (patch)
tree3afab4e48ba8040e7b88076c6929e2e5419923f2 /src/pages/background
parentRemoved google, yandex, bing #345 (diff)
downloadlibredirect-ed84d92598ff622a9f5a88ef0ce61e01e1598c2c.zip
Disabled reset settings on update. Bump version => 2.2.1
Diffstat (limited to 'src/pages/background')
-rw-r--r--src/pages/background/background.js27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/pages/background/background.js b/src/pages/background/background.js
index 5fef360a..8f2bf2ba 100644
--- a/src/pages/background/background.js
+++ b/src/pages/background/background.js
@@ -59,22 +59,19 @@ browser.runtime.onInstalled.addListener(
});
})
};
- function initDefault() {
+ if (details.reason == 'install') initDefaults();
- }
-
- // if (details.reason == 'install') {
- if (details.reason == 'install' || (details.reason == "update" && details.previousVersion != browser.runtime.getManifest().version)) {
- if (details.reason == "update")
- browser.storage.local.get(null, r => {
- if (r.theme) {
- const old = encodeURIComponent(JSON.stringify(r))
- browser.tabs.create({ url: browser.runtime.getURL(`/pages/background/reset_warning.html?data=${old}`) });
- }
- initDefaults();
- })
- else initDefaults();
- }
+ // if (details.reason == 'install' || (details.reason == "update" && details.previousVersion != browser.runtime.getManifest().version)) {
+ // if (details.reason == "update")
+ // browser.storage.local.get(null, r => {
+ // if (r.theme) {
+ // const old = encodeURIComponent(JSON.stringify(r))
+ // browser.tabs.create({ url: browser.runtime.getURL(`/pages/background/reset_warning.html?data=${old}`) });
+ // }
+ // initDefaults();
+ // })
+ // else initDefaults();
+ // }
}
)