mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2024-12-22 12:50:36 +01:00
Importing settings file with an older storage version did not work properly
This commit is contained in:
parent
85c88ad3d8
commit
b361733c73
@ -110,10 +110,13 @@
|
||||
});
|
||||
input.click();
|
||||
});
|
||||
let json = JSON.parse(text);
|
||||
const json = JSON.parse(text);
|
||||
while (settingsMigration.transitions.hasOwnProperty(json.storageVersion)){
|
||||
let oldVersion = json.storageVersion;
|
||||
json = settingsMigration.transitions[json.storageVersion](json);
|
||||
const oldVersion = json.storageVersion;
|
||||
const modifiedData = settingsMigration.transitions[json.storageVersion](json);
|
||||
Object.keys(modifiedData).forEach(function(key){
|
||||
json[key] = modifiedData[key];
|
||||
});
|
||||
if (oldVersion === json.storageVersion){
|
||||
break;
|
||||
}
|
||||
@ -129,7 +132,9 @@
|
||||
}
|
||||
});
|
||||
keys.forEach(function(key){
|
||||
if (key !== "storageVersion"){
|
||||
settings[key] = json[key];
|
||||
}
|
||||
});
|
||||
},
|
||||
resetSettings: async function(){
|
||||
|
@ -17,6 +17,7 @@ Version 1.0:
|
||||
- added window.open protection
|
||||
- cross origin DOM manipulations
|
||||
- window.name protection was detectable
|
||||
- importing settings file with an older storage version did not work properly
|
||||
|
||||
known issues:
|
||||
- if a data URL is blocked the page action button does not appear
|
||||
|
Loading…
x
Reference in New Issue
Block a user