mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
Importing settings file with an very old storage version did not work at all
This commit is contained in:
parent
350c7b65d4
commit
64b60c834a
@ -122,15 +122,17 @@
|
||||
}
|
||||
}
|
||||
delete json.storageVersion;
|
||||
const keys = Object.keys(json);
|
||||
keys.forEach(function(key){
|
||||
const keys = Object.keys(json).filter(function(key){
|
||||
const setting = settings.getDefinition(key);
|
||||
if (!settings){
|
||||
throw new Error("Unknown setting " + key + ".");
|
||||
if (!setting){
|
||||
logging.error("Unknown setting " + key + ".");
|
||||
return false;
|
||||
}
|
||||
if (!setting.fixed && setting.invalid(json[key])){
|
||||
throw new Error("Invalid value " + json[key] + " for " + key + ".");
|
||||
logging.error("Invalid value " + json[key] + " for " + key + ".");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
keys.forEach(function(key){
|
||||
settings[key] = json[key];
|
||||
|
@ -9,6 +9,7 @@ Version 1.1:
|
||||
fixes:
|
||||
- error when exporting function with name "top"
|
||||
- tabs opened with window.open broke when the parent tab was reloaded/closed
|
||||
- importing settings file with an very old storage version did not work at all
|
||||
|
||||
known issues:
|
||||
- if a data URL is blocked the page action button does not appear
|
||||
|
Loading…
x
Reference in New Issue
Block a user