Commit 7fa9e881 authored by Pierre M's avatar Pierre M
Browse files

make automatic unlisting of closed accounts optional


Signed-off-by: Pierre M's avatarPierre Mazière <pierre.maziere@gmx.com>
parent 8523eb99
......@@ -32,6 +32,7 @@
}
let plonkClosedAccounts = GM_getValue("plonkClosedAccounts",true);
let unlistClosedAccounts = GM_getValue("unlistClosedAccounts",true);
GM_addStyle(".overlaybg{position:fixed;top:0;left:0;width: 100%;height: 100%;background-color:#000; opacity:0.5;z-index:100}");
GM_addStyle(".overlaywin{position:fixed;left:0;right:0;top:0;bottom:0;width:600px;height:300px;margin:auto;background-color:#FFF;z-index:101;padding:10px 20px;border:thick double #000}");
......@@ -181,12 +182,14 @@
onload: function(response) {
if(response.responseText.match(/Compte fermé/)){
response.context.style.display = "none";
if(unlistClosedAccounts){
let userLink =response.context.getElementsByClassName('meta').item(0).getElementsByTagName('a').item(0);
index = plonkList.indexOf(userLink.href.match(userRE)[1]);
if(index !== -1){
plonkList.splice(index,1);
GM_setValue("plonkList",JSON.stringify(plonkList));
}
}
}
}
});
......
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