mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 13:37:04 +03:00
Add warning about extension storage being disable
Fixes issues with Tor and Mullvad browser Fixes #1894
This commit is contained in:
Submodule maze-utils updated: 2aa3c0bc23...eb921d9475
Submodule public/_locales updated: b31f76dd29...017d0436c7
@@ -121,7 +121,7 @@ chrome.runtime.onInstalled.addListener(function () {
|
|||||||
const userID = Config.config.userID;
|
const userID = Config.config.userID;
|
||||||
|
|
||||||
// If there is no userID, then it is the first install.
|
// If there is no userID, then it is the first install.
|
||||||
if (!userID){
|
if (!userID && !Config.local.alreadyInstalled){
|
||||||
//open up the install page
|
//open up the install page
|
||||||
chrome.tabs.create({url: chrome.extension.getURL("/help/index.html")});
|
chrome.tabs.create({url: chrome.extension.getURL("/help/index.html")});
|
||||||
|
|
||||||
@@ -129,6 +129,7 @@ chrome.runtime.onInstalled.addListener(function () {
|
|||||||
const newUserID = generateUserID();
|
const newUserID = generateUserID();
|
||||||
//save this UUID
|
//save this UUID
|
||||||
Config.config.userID = newUserID;
|
Config.config.userID = newUserID;
|
||||||
|
Config.local.alreadyInstalled = true;
|
||||||
|
|
||||||
// Don't show update notification
|
// Don't show update notification
|
||||||
Config.config.categoryPillUpdate = true;
|
Config.config.categoryPillUpdate = true;
|
||||||
|
|||||||
@@ -137,6 +137,9 @@ interface SBStorage {
|
|||||||
/* VideoID prefixes to UUID prefixes */
|
/* VideoID prefixes to UUID prefixes */
|
||||||
downvotedSegments: Record<VideoID & HashedValue, VideoDownvotes>;
|
downvotedSegments: Record<VideoID & HashedValue, VideoDownvotes>;
|
||||||
navigationApiAvailable: boolean;
|
navigationApiAvailable: boolean;
|
||||||
|
|
||||||
|
// Used when sync storage disbaled
|
||||||
|
alreadyInstalled: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
class ConfigClass extends ProtoConfig<SBConfig, SBStorage> {
|
class ConfigClass extends ProtoConfig<SBConfig, SBStorage> {
|
||||||
@@ -456,7 +459,8 @@ const syncDefaults = {
|
|||||||
|
|
||||||
const localDefaults = {
|
const localDefaults = {
|
||||||
downvotedSegments: {},
|
downvotedSegments: {},
|
||||||
navigationApiAvailable: null
|
navigationApiAvailable: null,
|
||||||
|
alreadyInstalled: false
|
||||||
};
|
};
|
||||||
|
|
||||||
const Config = new ConfigClass(syncDefaults, localDefaults, migrateOldSyncFormats);
|
const Config = new ConfigClass(syncDefaults, localDefaults, migrateOldSyncFormats);
|
||||||
|
|||||||
Reference in New Issue
Block a user