aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAjay <[email protected]>2023-11-27 01:04:06 -0500
committerAjay <[email protected]>2023-11-27 01:04:06 -0500
commit1e5bd80471f7fb75be02fa9d88ca988f8fc44776 (patch)
tree7af3c7cad62949948f741c03c376e0d9710874c1 /src
parentd62d362f2e276f2c3fb1c18209ef0343edc96814 (diff)
downloadSponsorBlock-1e5bd80471f7fb75be02fa9d88ca988f8fc44776.tar.gz
SponsorBlock-1e5bd80471f7fb75be02fa9d88ca988f8fc44776.zip
Add warning about extension storage being disable5.4.28
Fixes issues with Tor and Mullvad browser Fixes #1894
Diffstat (limited to 'src')
-rw-r--r--src/background.ts3
-rw-r--r--src/config.ts6
2 files changed, 7 insertions, 2 deletions
diff --git a/src/background.ts b/src/background.ts
index d7d95819..99df62db 100644
--- a/src/background.ts
+++ b/src/background.ts
@@ -121,7 +121,7 @@ chrome.runtime.onInstalled.addListener(function () {
const userID = Config.config.userID;
// If there is no userID, then it is the first install.
- if (!userID){
+ if (!userID && !Config.local.alreadyInstalled){
//open up the install page
chrome.tabs.create({url: chrome.extension.getURL("/help/index.html")});
@@ -129,6 +129,7 @@ chrome.runtime.onInstalled.addListener(function () {
const newUserID = generateUserID();
//save this UUID
Config.config.userID = newUserID;
+ Config.local.alreadyInstalled = true;
// Don't show update notification
Config.config.categoryPillUpdate = true;
diff --git a/src/config.ts b/src/config.ts
index a753a36f..09a3ebfb 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -137,6 +137,9 @@ interface SBStorage {
/* VideoID prefixes to UUID prefixes */
downvotedSegments: Record<VideoID & HashedValue, VideoDownvotes>;
navigationApiAvailable: boolean;
+
+ // Used when sync storage disbaled
+ alreadyInstalled: boolean;
}
class ConfigClass extends ProtoConfig<SBConfig, SBStorage> {
@@ -456,7 +459,8 @@ const syncDefaults = {
const localDefaults = {
downvotedSegments: {},
- navigationApiAvailable: null
+ navigationApiAvailable: null,
+ alreadyInstalled: false
};
const Config = new ConfigClass(syncDefaults, localDefaults, migrateOldSyncFormats);