mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Delete button shows up when you enter correct password
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
var adminTogg = false;
|
||||
var pass_corr = "";
|
||||
|
||||
function admin()
|
||||
{
|
||||
@@ -30,7 +31,7 @@ function submitAdmin(form)
|
||||
}
|
||||
}).responseText;
|
||||
|
||||
pass = confRes;
|
||||
console.log(pass);
|
||||
|
||||
pass_corr = confRes;
|
||||
console.log(pass_corr);
|
||||
updateList();
|
||||
}
|
||||
|
||||
@@ -38,13 +38,14 @@ function updateList()
|
||||
var video_id = listeID["id"];
|
||||
var video_thumb = "http://i.ytimg.com/vi/"+video_id+"/default.jpg";
|
||||
var odd = ""; if(j%2==0)odd=" oddlist";
|
||||
var delsong = ""; if(pass_corr=="correct")delsong="<input id='del' title='Remove' type='button' class='button' value='X' onclick=\"vote('"+video_id+"','del')\">";
|
||||
var finalhtml="<div id='result' class='result lresult"+odd+"'>"+
|
||||
"<img src='"+video_thumb+"' class='thumb lthumb'>"+
|
||||
"<div class='ltitle'>"+video_title+"</div>"+
|
||||
"<div class='votes'>"+listeID["votes"]+
|
||||
"<a onclick=\"vote('"+video_id+"','pos');\" id='plus'>+</a>"+
|
||||
"<a onclick=\"vote('"+video_id+"','neg');\" id='minus'>-</a>"+
|
||||
"<input id='del' title='Remove' type='button' class='button' value='X' onclick=\"vote('"+video_id+"','del')\">"+
|
||||
delsong+
|
||||
"</div>"+
|
||||
"</div>";
|
||||
$("#wrapper").append(finalhtml);
|
||||
|
||||
Reference in New Issue
Block a user