mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-01-03 18:42:00 +01:00
Resetting the settings had undesired side effects
This commit is contained in:
parent
c62ddcc33f
commit
5020e0b070
@ -20,7 +20,7 @@
|
|||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
"": function(oldStorage){
|
"": function(oldStorage){
|
||||||
return {
|
return {
|
||||||
storageVersion: 0.5
|
storageVersion: 0.6
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
0.1: function(oldStorage){
|
0.1: function(oldStorage){
|
||||||
|
@ -141,21 +141,23 @@
|
|||||||
alert(error);
|
alert(error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
resetSettings: function(){
|
resetSettings: async function(){
|
||||||
modal.confirm(
|
try {
|
||||||
|
const clear = await modal.confirm(
|
||||||
extension.getTranslation("resetSettings_confirm"),
|
extension.getTranslation("resetSettings_confirm"),
|
||||||
{
|
{
|
||||||
node: this,
|
node: this,
|
||||||
selector: ".settingRow .content"
|
selector: ".settingRow .content"
|
||||||
}
|
}
|
||||||
).then(function(clear){
|
);
|
||||||
if (clear){
|
if (clear){
|
||||||
browser.storage.local.clear();
|
await browser.storage.local.clear();
|
||||||
|
await browser.storage.local.set({storageVersion: settings.storageVersion});
|
||||||
}
|
}
|
||||||
return;
|
}
|
||||||
}).catch(function(error){
|
catch (error){
|
||||||
logging.warning("Unable to reset settings:", error);
|
logging.warning("Unable to reset settings:", error);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ Version 0.5.15:
|
|||||||
- background color of the textarea in the settings export was not readable in the dark theme when the value was invalid
|
- background color of the textarea in the settings export was not readable in the dark theme when the value was invalid
|
||||||
- settings sanitation: added missing APIs
|
- settings sanitation: added missing APIs
|
||||||
- navigator.oscpu and navigator.buildID are undefined in non Gecko browsers
|
- navigator.oscpu and navigator.buildID are undefined in non Gecko browsers
|
||||||
|
- resetting the settings had undesired side effects
|
||||||
|
|
||||||
known issues:
|
known issues:
|
||||||
- if a data URL is blocked the page action button does not appear
|
- if a data URL is blocked the page action button does not appear
|
||||||
|
Loading…
x
Reference in New Issue
Block a user