diff --git a/js/admin.js b/js/admin.js index 643124f5..52eed227 100755 --- a/js/admin.js +++ b/js/admin.js @@ -4,12 +4,11 @@ var pass_corr = ""; function admin() { adminTogg = !adminTogg; - if(!adminTogg){ - $("#playlist").height($("#playlist").height()+$("#adminPanel").outerHeight(true)); - $("#passbox").focus(); - } + + if(adminTogg) $("#playlist").height($("#playlist").height()-210); //opening + if(!adminTogg)setTimeout(function(){$("#playlist").height($("#playlist").height()+210);},501); //closing + $("#adminPanel").toggleClass("hiddenAdmin"); - if(adminTogg) $("#playlist").height($("#playlist").height()-$("#adminPanel").outerHeight(true)); } diff --git a/js/list.js b/js/list.js index 34ddbdae..57a3c3a1 100755 --- a/js/list.js +++ b/js/list.js @@ -34,7 +34,7 @@ function updateList() $.each(list["songs"], function(j, listeID){ - var video_title=listeID["title"].replace(/\\\'/g, "'").replace(/\\\"/g,"'");; + var video_title=listeID["title"].replace(/\\\'/g, "'").replace(/"/g,"'").replace(/&/g,"&"); 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"; diff --git a/js/youtube.js b/js/youtube.js index 1b05b813..854a0cdb 100755 --- a/js/youtube.js +++ b/js/youtube.js @@ -273,7 +273,7 @@ function getTitle() success: function(data) { viewers = $.parseJSON(data); var outPutWord = viewers[5].length > 1 ? "viewers" : "viewer"; - var title= viewers[4].replace(/\\\'/g, "'").replace(/"/g,"'"); + var title= viewers[4].replace(/\\\'/g, "'").replace(/"/g,"'").replace(/&/g,"&"); document.title = title + " • Zöff"; document.getElementsByName('v')[0].placeholder = title + " • " + viewers[5].length + " " + outPutWord; } diff --git a/static/style.css b/static/style.css index 1ffb1e3b..de0a18da 100755 --- a/static/style.css +++ b/static/style.css @@ -78,7 +78,7 @@ input[type="radio"]{display: none;} .toggtext{display: inline;} .adminBox{float:right;} -#adminPanel{color:white; height:190px; padding: 10px; overflow:hidden; background-color: rgba(0,0,0,0.2);} +#adminPanel{color:white; height:190px; padding: 10px; overflow:hidden; background-color: rgba(0,0,0,0.2); transition: height 0.5s;} .hiddenAdmin{padding:0 !important; margin:0 !important; height: 0 !important;} .button{background-color: rgba(255,255,255,0.2); border-radius: 4px; border: none;color: white;padding: 5px 15px; margin-top: 15px; transition: all 0.1s ease-in-out;} .button:hover{background-color: rgba(255,255,255,0.4); }