mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-10 13:37:04 +03:00
add reset settings option
This commit is contained in:
@@ -113,6 +113,7 @@ export interface SBObject {
|
||||
local: SBStorage;
|
||||
forceSyncUpdate(prop: string): void;
|
||||
forceLocalUpdate(prop: string): void;
|
||||
resetToDefault(): void;
|
||||
}
|
||||
|
||||
const Config: SBObject = {
|
||||
@@ -289,7 +290,8 @@ const Config: SBObject = {
|
||||
config: null,
|
||||
local: null,
|
||||
forceSyncUpdate,
|
||||
forceLocalUpdate
|
||||
forceLocalUpdate,
|
||||
resetToDefault
|
||||
};
|
||||
|
||||
// Function setup
|
||||
@@ -522,6 +524,10 @@ function addDefaults() {
|
||||
}
|
||||
}
|
||||
|
||||
function resetToDefault() {
|
||||
chrome.storage.sync.set(Config.syncDefaults);
|
||||
}
|
||||
|
||||
// Sync config
|
||||
setupConfig();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user