Commit 38c38c7b authored by Pierre M's avatar Pierre M
Browse files

fix alias issues


Signed-off-by: Pierre M's avatarPierre Mazière <pierre.maziere@gmx.com>
parent b8b6247b
......@@ -214,7 +214,7 @@
checkbox.setAttribute("type","checkbox");
checkbox.setAttribute("name","articles_"+u);
checkbox.addEventListener("change",togglePlonk.bind(null,u,'article'));
if(plonkList[u][0]){
if(plonkList[u][1]){
checkbox.setAttribute("checked","checked");
}
col.appendChild(checkbox);
......@@ -225,7 +225,7 @@
checkbox.setAttribute("type","checkbox");
checkbox.setAttribute("name","comments_"+u);
checkbox.addEventListener("change",togglePlonk.bind(null,u,'comment'));
if(plonkList[u][1]){
if(plonkList[u][2]){
checkbox.setAttribute("checked","checked");
}
col.appendChild(checkbox);
......@@ -272,9 +272,11 @@
function plonk(user,alias){
if(user === alias.toLowerCase()){
alias = '';
storedAlias = '';
}else{
storedAlias = alias;
}
plonkList[user] = [alias,true,true];
plonkList[user] = [storedAlias,true,true];
GM_setValue("plonkList",JSON.stringify(plonkList));
let form = document.getElementById("plonkForm");
form.remove();
......
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