Commit a5ccfaa7 authored by Pierre M's avatar Pierre M
Browse files

fix transition from pre-JSON configuration data


Signed-off-by: Pierre M's avatarPierre Mazière <pierre.maziere@gmx.com>
parent 1f3f9afe
......@@ -17,7 +17,20 @@
(function() {
let userRE = new RegExp("https://linuxfr.org/users/(.*)$");
let plonkList = JSON.parse(GM_getValue("plonkList","[]"));
// check for pre-JSON configuration data
if(!Array.isArray(plonkList)){
if(typeof plonkList === "string"){
plonkList = plonkList.split(',');
if(plonkList.length === 1 && plonkList[0] === ""){
plonkList = [];
}
}else{
plonkList = [];
}
}
let plonkClosedAccounts = GM_getValue("plonkClosedAccounts",true);
GM_addStyle(".overlaybg{position:fixed;top:0;left:0;width: 100%;height: 100%;background-color:#000; opacity:0.5;z-index:100}");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment