diff --git a/gulpfile.js b/gulpfile.js
index c5a3912e..53f3994a 100755
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -5,11 +5,11 @@ var gulp    = require('gulp'),
 
 gulp.task('js', function () {
     gulp.src(['static/js/*.js', '!static/js/embed*', '!static/js/remotecontroller.js'])
-        .pipe(uglify({
+        /*.pipe(uglify({
         	mangle: true,
             compress: true,
         	enclose: true
-        }))
+        }))*/
         .pipe(concat('main.min.js'))
         .pipe(gulp.dest('static/dist'));
 });
diff --git a/index.php b/index.php
index f154339b..1cc1c641 100755
--- a/index.php
+++ b/index.php
@@ -30,7 +30,9 @@
                         Loading...
                     
                     
+                        
                     
                 
 
@@ -259,7 +261,7 @@
                         
                     
                     
-                      
                     
diff --git a/static/dist/embed.min.js b/static/dist/embed.min.js
index fd3ac186..02670ebf 100755
--- a/static/dist/embed.min.js
+++ b/static/dist/embed.min.js
@@ -1 +1 @@
-!function(){function e(e){$("#volume").slider("value",e),c.setVolume(e)}var t={loaded:!0,before_load:"",after_load:"",ytplayer:"",stopInterval:!1,setup_youtube_listener:function(e){a.on("np",function(e){if(t.loaded=!1,0==e.length){document.getElementById("song-title").innerHTML="Empty channel. Add some songs!",$("#player_overlay").height($("#player").height()),window.MSStream||$("#player_overlay").toggleClass("hide");try{t.ytplayer.stopVideo()}catch(o){}}else{void 0==l?l=e[0][0].id:l!=s&&(l=s),s=e[0][0].id,conf=e[1][0],time=e[2],n=time-conf.startTime,u=e[0][0].title,duration=e[0][0].duration,_&&window.mobilecheck()&&0==n&&(n=1),full_playlist[0].id==s&&d.song_change(full_playlist[0].added);try{Suggestions.fetchYoutubeSuggests(s)}catch(o){}if(t.getTitle(u,viewers),t.setBGimage(s),m&&!window.MSStream)try{t.ytplayer.getVideoUrl().split("v=")[1]!=s&&(t.ytplayer.loadVideoById(s),t.notifyUser(s,u),t.ytplayer.seekTo(n),p&&t.ytplayer.pauseVideo()),p||(_||t.ytplayer.playVideo(),C||t.durationSetter()),(t.ytplayer.getDuration()>n||0==t.ytplayer.getDuration())&&t.ytplayer.seekTo(n),t.after_load=s,setTimeout(function(){t.loaded=!0},500)}catch(o){C||t.durationSetter()}else t.getTitle(u,viewers)}})},onPlayerStateChange:function(e){switch(e.data){case-1:break;case 0:playing=!1,p=!1,a.emit("end",s);break;case 1:playing=!0,beginning&&window.mobilecheck()&&(t.ytplayer.pauseVideo(),beginning=!1,_=!1),v||o.addClass("#player_overlay","hide"),1==document.getElementById("play").className.split(" ").length&&$("#play").toggleClass("hide"),2==document.getElementById("pause").className.split(" ").length&&$("#pause").toggleClass("hide"),p&&(a.emit("pos"),p=!1);break;case 2:p=!0,c.play_pause_show(),_=!0;break;case 3:}},getTitle:function(e,t){var o=t>1?"viewers":"viewer",n=decodeURIComponent(e),a=document.getElementById("song-title"),i=document.getElementById("viewers");document.title=n+" • Zöff / "+S,a.innerHTML=n,i.innerHTML=t+" "+o,a.title=n+" • "+t+" "+o},errorHandler:function(e){5==e.data||100==e.data||101==e.data||150==e.data?(curr_playing=t.ytplayer.getVideoUrl().replace("https://www.youtube.com/watch?v=",""),a.emit("skip",{error:e.data,id:s,pass:k})):void 0!==s&&t.ytplayer.loadVideoById(s)},onPlayerReady:function(e){$("#channel-load").css("display","none");try{beginning=!0,m=!0,window.MSStream||($("#player").css("opacity","1"),$("#controls").css("opacity","1"),$(".playlist").css("opacity","1"),t.ytplayer.loadVideoById(s),T&&!window.mobilecheck()&&t.ytplayer.playVideo(),C||t.durationSetter(),v?setTimeout(function(){t.ytplayer.seekTo(n),T||(t.ytplayer.pauseVideo(),c.play_pause_show())},1e3):t.ytplayer.seekTo(n)),t.readyLooks(),c.initYoutubeControls(t.ytplayer),c.initSlider(),t.ytplayer.setVolume(Crypt.get_volume()),$(".video-container").removeClass("no-opacity")}catch(o){}},readyLooks:function(){t.setBGimage(s)},setBGimage:function(e){if(void 0!==e&&!v){var t=new Image;t.onload=function(){var e=new ColorThief,n=e.getColor(t);document.getElementsByTagName("body")[0].style.backgroundColor=o.rgbToHsl(n,!0),$("meta[name=theme-color]").attr("content",o.rgbToHex(n[0],n[1],n[2]))},t.crossOrigin="Anonymous",t.src="https://zoff.no:8080/https://img.youtube.com/vi/"+e+"/mqdefault.jpg"}},set_width:function(e){$(".video-container").width(e)},notifyUser:function(e,t){if(t=t.replace(/\\\'/g,"'").replace(/"/g,"'").replace(/&/g,"&"),"granted"===Notification.permission&&document.hidden){var o=new Notification("Now Playing",{body:t,icon:"http://i.ytimg.com/vi/"+e+"/mqdefault.jpg",iconUrl:"http://i.ytimg.com/vi/"+e+"/mqdefault.jpg"});o.onclick=function(e){window.focus(),this.cancel()},setTimeout(function(){o.close()},5e3)}},setup_all_listeners:function(){a.on("get_list",function(){a.emit("list",S.toLowerCase())}),t.setup_youtube_listener(S),Admin.admin_listener(),Chat.setup_chat_listener(S),Chat.allchat_listener(),d.channel_listener()},onYouTubeIframeAPIReady:function(){t.ytplayer=new YT.Player("player",{videoId:s,playerVars:{rel:"0",wmode:"transparent",controls:"0",iv_load_policy:"3",theme:"light",color:"white",showinfo:0},events:{onReady:t.onPlayerReady,onStateChange:t.onPlayerStateChange,onError:t.errorHandler}})},durationSetter:function(){if(void 0!=duration)try{t.stopInterval||(C=!0),dMinutes=Math.floor(duration/60),dSeconds=duration-60*dMinutes,currDurr=void 0!=t.ytplayer.getCurrentTime()?Math.floor(t.ytplayer.getCurrentTime()):n,currDurr>duration&&(currDurr=duration),minutes=Math.floor(currDurr/60),seconds=currDurr-60*minutes,document.getElementById("duration").innerHTML=o.pad(minutes)+":"+o.pad(seconds)+" / "+o.pad(dMinutes)+":"+o.pad(dSeconds),per=100/duration*currDurr,per>=100?per=100:0==duration&&(per=0),$("#bar").width(per+"%")}catch(e){}t.stopInterval||setTimeout(t.durationSetter,1e3)},loadPlayer:function(){1==$("script[src='https://www.youtube.com/iframe_api']").length?t.onYouTubeIframeAPIReady():(tag=document.createElement("script"),tag.src="https://www.youtube.com/iframe_api",firstScriptTag=document.getElementsByTagName("script")[0],firstScriptTag.parentNode.insertBefore(tag,firstScriptTag))}};window.mobilecheck=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e};var o={rnd:function(e){return e[Math.floor(Math.random()*e.length)]},predicate:function(){for(var e,t,o,n=[],a=arguments.length,i=function(e,t){return e===t?0:t>e?-1:1},s=function(e,t){var o=i,n=i;return e&&(n=function(t,n){return o(e(t),e(n))}),t?function(e,t){return-1*n(e,t)}:n},l=0;a>l;l++)e=arguments[l],"string"==typeof e?(t=e,o=i):(t=e.name,o=s(e.primer,e.reverse)),n.push({name:t,cmp:o});return function(t,o){for(var i,s,l=0;a>l&&(s=0,e=n[l],i=e.name,s=e.cmp(t[i],o[i]),0===s);l++);return s}},hashCode:function(e){for(var t=0,o=0;o>24&255).toString(16)+(e>>16&255).toString(16)+(e>>8&255).toString(16)+(255&e).toString(16)},hexToRgb:function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},pad:function(e){return 10>e?"0"+Math.floor(e):Math.floor(e)},contains:function(e,t){for(var o=e.length;o--;)if(e[o]===t)return!0;return!1},sample:function(){Date.now()-lastSample>=2*SAMPLE_RATE&&(a.removeAllListeners(),a.disconnect(),a.connect(),t.setup_all_listeners()),lastSample=Date.now(),setTimeout(o.sample,SAMPLE_RATE)},loadjsfile:function(e){if(-1==filesadded.indexOf("["+e+"]")){var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",e),document.getElementsByTagName("head")[0].appendChild(t),filesadded+="["+e+"]"}},msieversion:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");return t>0||navigator.userAgent.match(/Trident.*rv\:11\./)?!0:!1},getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e))+e},rgbToHsl:function(e,t){r=e[0],g=e[1],b=e[2],r/=255,g/=255,b/=255;var o,n,a=Math.max(r,g,b),i=Math.min(r,g,b),s=(a+i)/2;if(a==i)o=n=0;else{var l=a-i;switch(n=s>.5?l/(2-a-i):l/(a+i),a){case r:o=(g-b)/l+(g.5&&t?s=.5:.65>s&&!t&&(s=.65),"hsl("+Math.floor(360*o)+", "+Math.floor(100*n)+"%, "+Math.floor(100*s)+"%)"},componentToHex:function(e){var t=e.toString(16);return 1==t.length?"0"+t:t},rgbToHex:function(e,t,n){return"#"+o.componentToHex(e)+o.componentToHex(t)+o.componentToHex(n)},upperFirst:function(e){return e.substring(0,1).toUpperCase()+e.substring(1).toLowerCase()},addClass:function(e,t){o.contains($(e).attr("class").split(" "),t)||$(e).addClass(t)},send_mail:function(e,t){if(""!=e&&""!=t){$("#submit-contact-form").addClass("hide"),$("#send-loader").removeClass("hide"),$("#contact-form-from").attr("disabled","true"),$("#contact-form-message").attr("disabled","true");var e=$("#contact-form-from").val(),t=$("#contact-form-message").val();$("#contact-container").empty(),newWindow=window.open("mailto:contact@zoff.no?Subject=Contact%20Zoff&Body="+t,"_blank"),$("#contact-container").html("Something went wrong, sorry about that. You could instead try with your own mail-client: contact@zoff.no"),setTimeout(function(){newWindow.close()},500)}}};$(document).on("submit","#contact-form",function(e){e.preventDefault();var t=$("#contact-form-message").val(),n=$("#contact-form-from").val();o.send_mail(n,t)}),Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var e=0,t=this.length;t>e;e++)this[e]&&this[e].parentElement&&this[e].parentElement.removeChild(this[e])},String.prototype.startsWith=function(e,t){return t=t||0,this.indexOf(e,t)===t};var n,a,s,l,c={stopInterval:!1,initYoutubeControls:function(){!window.mobilecheck()||/iPad|iPhone|iPod/.test(navigator.userAgent)||window.MSStream||$("#controls").appendTo("#playbar"),c.initControls()},initControls:function(){document.getElementById("volume-button").addEventListener("click",c.mute_video),document.getElementById("playpause").addEventListener("click",c.play_pause),document.getElementById("fullscreen").addEventListener("click",c.fullscreen)},initSlider:function(){try{w=Crypt.get_volume()}catch(e){}$("#volume").slider({min:0,max:100,value:w,range:"min",animate:!0,slide:function(e,t){c.setVolume(t.value);try{Crypt.set_volume(t.value)}catch(o){}}}),c.choose_button(w,!1)},fullscreen:function(){var e=document.getElementById("player"),t=e.requestFullScreen||e.mozRequestFullScreen||e.webkitRequestFullScreen;t&&t.bind(e)()},play_pause:function(){1==t.ytplayer.getPlayerState()?(t.ytplayer.pauseVideo(),!window.mobilecheck()||/iPad|iPhone|iPod/.test(navigator.userAgent)||window.MSStream||(document.getElementById("player").style.display="none",$(".video-container").toggleClass("click-through"),$(".page-footer").toggleClass("padding-bottom-extra"))):(2==t.ytplayer.getPlayerState()||0==t.ytplayer.getPlayerState())&&(t.ytplayer.playVideo(),!window.mobilecheck()||/iPad|iPhone|iPod/.test(navigator.userAgent)||window.MSStream||(document.getElementById("player").style.display="block",$(".video-container").toggleClass("click-through"),$(".page-footer").toggleClass("padding-bottom-extra")))},play_pause_show:function(){1==document.getElementById("pause").className.split(" ").length&&$("#pause").toggleClass("hide"),2==document.getElementById("play").className.split(" ").length&&$("#play").toggleClass("hide")},settings:function(){$("#qS").toggleClass("hide")},changeQuality:function(e){t.ytplayer.getPlaybackQuality!=e&&(t.ytplayer.setPlaybackQuality(e),t.ytplayer.getPlaybackQuality()),$("#qS").toggleClass("hide")},mute_video:function(){t.ytplayer.isMuted()?(t.ytplayer.unMute(),c.choose_button(t.ytplayer.getVolume(),!1)):(c.choose_button(0,!0),t.ytplayer.mute())},setVolume:function(e){t.ytplayer.setVolume(e),c.choose_button(e,!1),t.ytplayer.isMuted()&&t.ytplayer.unMute()},choose_button:function(e,t){t?(1==document.getElementById("v-full").className.split(" ").length&&$("#v-full").toggleClass("hide"),1==document.getElementById("v-medium").className.split(" ").length&&$("#v-medium").toggleClass("hide"),1==document.getElementById("v-low").className.split(" ").length&&$("#v-low").toggleClass("hide"),2==document.getElementById("v-mute").className.split(" ").length&&$("#v-mute").toggleClass("hide")):e>=0&&33>=e?(1==document.getElementById("v-full").className.split(" ").length&&$("#v-full").toggleClass("hide"),1==document.getElementById("v-medium").className.split(" ").length&&$("#v-medium").toggleClass("hide"),2==document.getElementById("v-low").className.split(" ").length&&$("#v-low").toggleClass("hide"),1==document.getElementById("v-mute").className.split(" ").length&&$("#v-mute").toggleClass("hide")):e>=34&&66>=e?(1==document.getElementById("v-full").className.split(" ").length&&$("#v-full").toggleClass("hide"),2==document.getElementById("v-medium").className.split(" ").length&&$("#v-medium").toggleClass("hide"),1==document.getElementById("v-low").className.split(" ").length&&$("#v-low").toggleClass("hide"),1==document.getElementById("v-mute").className.split(" ").length&&$("#v-mute").toggleClass("hide")):e>=67&&100>=e&&(2==document.getElementById("v-full").className.split(" ").length&&$("#v-full").toggleClass("hide"),1==document.getElementById("v-medium").className.split(" ").length&&$("#v-medium").toggleClass("hide"),1==document.getElementById("v-low").className.split(" ").length&&$("#v-low").toggleClass("hide"),1==document.getElementById("v-mute").className.split(" ").length&&$("#v-mute").toggleClass("hide"))},playPause:function(){state=t.ytplayer.getPlayerState(),button=document.getElementById("playpause"),1==state?t.ytplayer.pauseVideo():2==state&&t.ytplayer.playVideo()},volumeOptions:function(){t.ytplayer.isMuted()?(t.ytplayer.unMute(),w=t.ytplayer.getVolume(),$("#volume").slider("value",t.ytplayer.getVolume())):(t.ytplayer.mute(),$("#volume").slider("value",0))},hoverMute:function(e){w=t.ytplayer.getVolume()}},d={empty:!1,channel_listener:function(){a.on("channel",function(e){d.channel_function(e)})},channel_function:function(e){switch(e[0]){case"list":d.populate_list(e[1]);break;case"added":d.added_song(e[1]);break;case"deleted":d.deleted_song(e[1]);break;case"vote":d.voted_song(e[1],e[2]);break;case"song_change":d.song_change(e[1])}},populate_list:function(e){void 0==h&&(h=$("#list-song-html").html()),full_playlist=e,d.sortList(),$("#wrapper").empty(),full_playlist.length>1?($.each(full_playlist,function(e,t){t.now_playing||$("#wrapper").append(d.generateSong(t,!1,y,!0))}),y&&(window.mobilecheck()?$(".list-image").lazyload({}):($(".list-image").lazyload({container:$("#wrapper")}).removeClass("lazy"),document.getElementById("wrapper").scrollTop+=1,document.getElementById("wrapper").scrollTop+=-1))):(d.empty=!0,$("#wrapper").append("The playlist is empty.")),$("#settings").css("visibility","visible"),$("#settings").css("opacity","1"),$("#wrapper").css("opacity","1")},added_song:function(e){full_playlist.push(e),d.sortList(),$("#suggested-"+e.id).remove(),d.empty&&($("#empty-channel-message").remove(),d.empty=!1),d.insertAtIndex(e,!0)},deleted_song:function(e){var t=d.getIndexOfSong(e),o=$("#wrapper").children()[t];try{o.style.height=0,setTimeout(function(){$("#"+e).remove(),full_playlist.splice(d.getIndexOfSong(e),1)},305),document.getElementById("wrapper").scrollTop+=1,document.getElementById("wrapper").scrollTop+=-1}catch(n){full_playlist.splice(d.getIndexOfSong(e),1),d.empty||$("#wrapper").children()[$("#wrapper").children().length-1].remove()}full_playlist.length<=2&&(d.empty=!0,$("#wrapper").append("The playlist is empty.")),$("#suggested-"+e).remove(),Suggestions.checkUserEmpty()},voted_song:function(e,t){var o=d.getIndexOfSong(e),n=full_playlist[o];full_playlist[o].votes+=1,full_playlist[o].added=t,d.sortList(),$("#"+e).remove(),d.insertAtIndex(n,!1)},song_change:function(e){var t=full_playlist.length-1;full_playlist[0].now_playing=!0,full_playlist[0].votes=0,full_playlist[0].guids=[],full_playlist[0].added=e,full_playlist[t].now_playing=!1;try{full_playlist.push(full_playlist.shift()),d.empty||$("#wrapper").children()[0].remove(),d.insertAtIndex(full_playlist[t-1],!1),document.getElementById("wrapper").scrollTop+=1,document.getElementById("wrapper").scrollTop+=-1}catch(o){}},vote:function(e,t){return a.emit("vote",[S,e,t,k]),!0},skip:function(){return a.emit("skip",{pass:k,id:s}),!0},importOldList:function(e){var t="",o=0;playlist_url="lists/"+e+".json",list=$.parseJSON($.ajax({type:"GET",url:playlist_url,async:!1}).responseText),$.each(list.songs,function(e,n){t+=n.id+",",o>45&&(Search.addVideos(t),t="",o=0),o++}),Search.addVideos(t),document.getElementById("search").value=""},sortList:function(){full_playlist.sort(o.predicate({name:"votes",reverse:!0},"added"))},show:function(){window.mobilecheck()||(showToggle?(showToggle=!1,$("#toptitle").empty(),$("#chan").addClass("bigChan"),$("#chan").html("zoff.no/"+S.toLowerCase())):(showToggle=!0,$("#toptitle").html("Zöff"),$("#chan").removeClass("bigChan"),$("#chan").html(S)))},insertAtIndex:function(e,t){i=d.getIndexOfSong(e.id),0===i?$("#wrapper").prepend(d.generateSong(e,t,!1,!0,!1)):$("#wrapper > div:nth-child("+i+")").after(d.generateSong(e,t,!1,!0,!1)),t&&setTimeout(function(){var e=$("#wrapper").children()[i];$(e).css("height",66)},5)},generateSong:function(e,t,o,n,a){var i,s,l=e.id,r=e.title,c=e.votes,d="background-image:url('//img.youtube.com/vi/"+l+"/mqdefault.jpg');",u=$(""+h+"
"),p="style";return t&&u.find("#list-song").css("height",0),f||u.find(".card-action").removeClass("hide"),1==c&&u.find(".vote-text").text("vote"),o&&(d="//img.youtube.com/vi/"+l+"/mqdefault.jpg",p="data-original"),n?(u.find(".list-votes").text(c),u.find("#list-song").attr("id",l),u.find(".vote-container").attr("title",r),i=".vote-container",s="del"):n||(u.find(".vote-text").text(e.duration),i=".add-suggested",s=a?"del_user_suggested":"del_suggested",u.find(".vote-container").attr("class","clickable add-suggested"),u.find(".add-suggested").attr("title",r),u.find("#del").attr("id",s),u.find(i).attr("data-video-title",r),u.find(i).attr("data-video-length",e.length),u.find("#list-song").attr("id","suggested-"+l),u.find(".list-image").attr("class",u.find(".list-image").attr("class").replace("list-image","list-suggested-image"))),u.find(".list-title").text(r),u.find(".list-title").attr("title",r),u.find(i).attr("data-video-id",l),u.find(".list-image").attr(p,d),u.find(".list-suggested-image").attr(p,d),u.find("#"+s).attr("data-video-id",l),u.html()},getIndexOfSong:function(e){return indexes=$.map(full_playlist,function(t,o){return t.id==e?o:void 0}),indexes[0]},scrollTop:function(){$("#wrapper").scrollTop(0)},scrollBottom:function(){$("#wrapper").scrollTop($("#wrapper")[0].scrollHeight)}},u="",p=!1,m=!1,h=$("#list-song-html").html(),f=!0,y=!1,v=!0,w=100,k="",_=!1,C=!1,I=window.location.hash.substring(1).split("&"),S=I[0],T=!1,x={"sync disconnect on unload":!0,secure:!0,"force new connection":!0};$(document).ready(function(){2==I.length&&"autoplay"==I[1]?T=!0:p=!0,$("head").append(''),$("head").append(''),add="https://zoff.no",a=io.connect(""+add+":8880",x),a.on("get_list",function(){setTimeout(function(){a.emit("list",S.toLowerCase())},1e3)}),a.on("viewers",function(e){viewers=e,void 0!==u&&t.getTitle(u,viewers)}),t.setup_youtube_listener(S),d.channel_listener(),window.onYouTubeIframeAPIReady=t.onYouTubeIframeAPIReady,t.loadPlayer(),c.initSlider(),window.setVolume=e}),$(document).on("click","#zoffbutton",function(e){window.open("https://zoff.no/"+S.toLowerCase()+"/","_blank")}),$(document).on("click",".vote-container",function(e){var t=$(this).attr("data-video-id");d.vote(t,"pos")})}();
\ No newline at end of file
+!function(){function e(e){$("#volume").slider("value",e),d.setVolume(e)}var t={loaded:!0,before_load:"",after_load:"",ytplayer:"",stopInterval:!1,setup_youtube_listener:function(e){a.on("np",function(e){if(t.loaded=!1,0==e.length){document.getElementById("song-title").innerHTML="Empty channel. Add some songs!",$("#player_overlay").height($("#player").height()),window.MSStream||$("#player_overlay").toggleClass("hide");try{t.ytplayer.stopVideo()}catch(n){}}else{void 0==s?s=e[0][0].id:s!=l&&(s=l),l=e[0][0].id,conf=e[1][0],time=e[2],o=time-conf.startTime,u=e[0][0].title,duration=e[0][0].duration,k&&window.mobilecheck()&&0==o&&(o=1),full_playlist[0].id==l&&c.song_change(full_playlist[0].added);try{Suggestions.fetchYoutubeSuggests(l)}catch(n){}if(t.getTitle(u,viewers),t.setBGimage(l),m&&!window.MSStream)try{t.ytplayer.getVideoUrl().split("v=")[1]!=l&&(t.ytplayer.loadVideoById(l),t.notifyUser(l,u),t.ytplayer.seekTo(o),p&&t.ytplayer.pauseVideo()),p||(k||t.ytplayer.playVideo(),C||t.durationSetter()),(t.ytplayer.getDuration()>o||0==t.ytplayer.getDuration())&&t.ytplayer.seekTo(o),t.after_load=l,setTimeout(function(){t.loaded=!0},500)}catch(n){C||t.durationSetter()}else t.getTitle(u,viewers)}})},onPlayerStateChange:function(e){switch(e.data){case-1:break;case 0:playing=!1,p=!1,a.emit("end",l);break;case 1:playing=!0,beginning&&window.mobilecheck()&&(t.ytplayer.pauseVideo(),beginning=!1,k=!1),v||n.addClass("#player_overlay","hide"),1==document.getElementById("play").className.split(" ").length&&$("#play").toggleClass("hide"),2==document.getElementById("pause").className.split(" ").length&&$("#pause").toggleClass("hide"),p&&(a.emit("pos"),p=!1);break;case 2:p=!0,d.play_pause_show(),k=!0;break;case 3:}},getTitle:function(e,t){var n=t>1?"viewers":"viewer",o=decodeURIComponent(e),a=document.getElementById("song-title"),i=document.getElementById("viewers");document.title=o+" • Zöff / "+S,a.innerHTML=o,i.innerHTML=t+" "+n,a.title=o+" • "+t+" "+n},errorHandler:function(e){5==e.data||100==e.data||101==e.data||150==e.data?(curr_playing=t.ytplayer.getVideoUrl().replace("https://www.youtube.com/watch?v=",""),a.emit("skip",{error:e.data,id:l,pass:_})):void 0!==l&&t.ytplayer.loadVideoById(l)},onPlayerReady:function(e){$("#channel-load").css("display","none");try{beginning=!0,m=!0,window.MSStream||($("#player").css("opacity","1"),$("#controls").css("opacity","1"),$(".playlist").css("opacity","1"),t.ytplayer.loadVideoById(l),T&&!window.mobilecheck()&&t.ytplayer.playVideo(),C||t.durationSetter(),v?setTimeout(function(){t.ytplayer.seekTo(o),T||(t.ytplayer.pauseVideo(),d.play_pause_show())},1e3):t.ytplayer.seekTo(o)),t.readyLooks(),d.initYoutubeControls(t.ytplayer),d.initSlider(),t.ytplayer.setVolume(Crypt.get_volume()),$(".video-container").removeClass("no-opacity")}catch(n){}},readyLooks:function(){t.setBGimage(l)},setBGimage:function(e){if(void 0!==e&&!v){var t=new Image;t.onload=function(){var e=new ColorThief,o=e.getColor(t);document.getElementsByTagName("body")[0].style.backgroundColor=n.rgbToHsl(o,!0),$("meta[name=theme-color]").attr("content",n.rgbToHex(o[0],o[1],o[2]))},t.crossOrigin="Anonymous",t.src="https://zoff.no:8080/https://img.youtube.com/vi/"+e+"/mqdefault.jpg"}},set_width:function(e){$(".video-container").width(e)},notifyUser:function(e,t){if(t=t.replace(/\\\'/g,"'").replace(/"/g,"'").replace(/&/g,"&"),"granted"===Notification.permission&&document.hidden){var n=new Notification("Now Playing",{body:t,icon:"http://i.ytimg.com/vi/"+e+"/mqdefault.jpg",iconUrl:"http://i.ytimg.com/vi/"+e+"/mqdefault.jpg"});n.onclick=function(e){window.focus(),this.cancel()},setTimeout(function(){n.close()},5e3)}},setup_all_listeners:function(){a.on("get_list",function(){a.emit("list",S.toLowerCase())}),t.setup_youtube_listener(S),Admin.admin_listener(),Chat.setup_chat_listener(S),Chat.allchat_listener(),c.channel_listener()},onYouTubeIframeAPIReady:function(){t.ytplayer=new YT.Player("player",{videoId:l,playerVars:{rel:"0",wmode:"transparent",controls:"0",iv_load_policy:"3",theme:"light",color:"white",showinfo:0},events:{onReady:t.onPlayerReady,onStateChange:t.onPlayerStateChange,onError:t.errorHandler}})},durationSetter:function(){if(void 0!=duration)try{t.stopInterval||(C=!0),dMinutes=Math.floor(duration/60),dSeconds=duration-60*dMinutes,currDurr=void 0!=t.ytplayer.getCurrentTime()?Math.floor(t.ytplayer.getCurrentTime()):o,currDurr>duration&&(currDurr=duration),minutes=Math.floor(currDurr/60),seconds=currDurr-60*minutes,document.getElementById("duration").innerHTML=n.pad(minutes)+":"+n.pad(seconds)+" / "+n.pad(dMinutes)+":"+n.pad(dSeconds),per=100/duration*currDurr,per>=100?per=100:0==duration&&(per=0),$("#bar").width(per+"%")}catch(e){}t.stopInterval||setTimeout(t.durationSetter,1e3)},loadPlayer:function(){1==$("script[src='https://www.youtube.com/iframe_api']").length?t.onYouTubeIframeAPIReady():(tag=document.createElement("script"),tag.src="https://www.youtube.com/iframe_api",firstScriptTag=document.getElementsByTagName("script")[0],firstScriptTag.parentNode.insertBefore(tag,firstScriptTag))}};window.mobilecheck=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e};var n={rnd:function(e){return e[Math.floor(Math.random()*e.length)]},predicate:function(){for(var e,t,n,o=[],a=arguments.length,i=function(e,t){return e===t?0:t>e?-1:1},l=function(e,t){var n=i,o=i;return e&&(o=function(t,o){return n(e(t),e(o))}),t?function(e,t){return-1*o(e,t)}:o},s=0;a>s;s++)e=arguments[s],"string"==typeof e?(t=e,n=i):(t=e.name,n=l(e.primer,e.reverse)),o.push({name:t,cmp:n});return function(t,n){for(var i,l,s=0;a>s&&(l=0,e=o[s],i=e.name,l=e.cmp(t[i],n[i]),0===l);s++);return l}},hashCode:function(e){for(var t=0,n=0;n>24&255).toString(16)+(e>>16&255).toString(16)+(e>>8&255).toString(16)+(255&e).toString(16)},hexToRgb:function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},pad:function(e){return 10>e?"0"+Math.floor(e):Math.floor(e)},contains:function(e,t){for(var n=e.length;n--;)if(e[n]===t)return!0;return!1},sample:function(){Date.now()-lastSample>=2*SAMPLE_RATE&&(a.removeAllListeners(),a.disconnect(),a.connect(),t.setup_all_listeners()),lastSample=Date.now(),setTimeout(n.sample,SAMPLE_RATE)},loadjsfile:function(e){if(-1==filesadded.indexOf("["+e+"]")){var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",e),document.getElementsByTagName("head")[0].appendChild(t),filesadded+="["+e+"]"}},msieversion:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");return t>0||navigator.userAgent.match(/Trident.*rv\:11\./)?!0:!1},getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e))+e},rgbToHsl:function(e,t){r=e[0],g=e[1],b=e[2],r/=255,g/=255,b/=255;var n,o,a=Math.max(r,g,b),i=Math.min(r,g,b),l=(a+i)/2;if(a==i)n=o=0;else{var s=a-i;switch(o=l>.5?s/(2-a-i):s/(a+i),a){case r:n=(g-b)/s+(g.5&&t?l=.5:.65>l&&!t&&(l=.65),"hsl("+Math.floor(360*n)+", "+Math.floor(100*o)+"%, "+Math.floor(100*l)+"%)"},componentToHex:function(e){var t=e.toString(16);return 1==t.length?"0"+t:t},rgbToHex:function(e,t,o){return"#"+n.componentToHex(e)+n.componentToHex(t)+n.componentToHex(o)},upperFirst:function(e){return e.substring(0,1).toUpperCase()+e.substring(1).toLowerCase()},addClass:function(e,t){n.contains($(e).attr("class").split(" "),t)||$(e).addClass(t)},send_mail:function(e,t){if(""!=e&&""!=t){$("#submit-contact-form").addClass("hide"),$("#send-loader").removeClass("hide"),$("#contact-form-from").attr("disabled","true"),$("#contact-form-message").attr("disabled","true");var e=$("#contact-form-from").val(),t=$("#contact-form-message").val();$("#contact-container").empty(),newWindow=window.open("mailto:contact@zoff.no?Subject=Contact%20Zoff&Body="+t,"_blank"),$("#contact-container").html("Something went wrong, sorry about that. You could instead try with your own mail-client: contact@zoff.no"),setTimeout(function(){newWindow.close()},500)}}};$(document).on("submit","#contact-form",function(e){e.preventDefault();var t=$("#contact-form-message").val(),o=$("#contact-form-from").val();n.send_mail(o,t)}),Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var e=0,t=this.length;t>e;e++)this[e]&&this[e].parentElement&&this[e].parentElement.removeChild(this[e])},String.prototype.startsWith=function(e,t){return t=t||0,this.indexOf(e,t)===t};var o,a,l,s,d={stopInterval:!1,initYoutubeControls:function(){!window.mobilecheck()||/iPad|iPhone|iPod/.test(navigator.userAgent)||window.MSStream||$("#controls").appendTo("#playbar"),d.initControls()},initControls:function(){document.getElementById("volume-button").addEventListener("click",d.mute_video),document.getElementById("playpause").addEventListener("click",d.play_pause),document.getElementById("fullscreen").addEventListener("click",d.fullscreen)},initSlider:function(){try{w=Crypt.get_volume()}catch(e){}$("#volume").slider({min:0,max:100,value:w,range:"min",animate:!0,slide:function(e,t){d.setVolume(t.value);try{Crypt.set_volume(t.value)}catch(n){}}}),d.choose_button(w,!1)},fullscreen:function(){var e=document.getElementById("player"),t=e.requestFullScreen||e.mozRequestFullScreen||e.webkitRequestFullScreen;t&&t.bind(e)()},play_pause:function(){1==t.ytplayer.getPlayerState()?(t.ytplayer.pauseVideo(),!window.mobilecheck()||/iPad|iPhone|iPod/.test(navigator.userAgent)||window.MSStream||(document.getElementById("player").style.display="none",$(".video-container").toggleClass("click-through"),$(".page-footer").toggleClass("padding-bottom-extra"))):(2==t.ytplayer.getPlayerState()||0==t.ytplayer.getPlayerState())&&(t.ytplayer.playVideo(),!window.mobilecheck()||/iPad|iPhone|iPod/.test(navigator.userAgent)||window.MSStream||(document.getElementById("player").style.display="block",$(".video-container").toggleClass("click-through"),$(".page-footer").toggleClass("padding-bottom-extra")))},play_pause_show:function(){1==document.getElementById("pause").className.split(" ").length&&$("#pause").toggleClass("hide"),2==document.getElementById("play").className.split(" ").length&&$("#play").toggleClass("hide")},settings:function(){$("#qS").toggleClass("hide")},changeQuality:function(e){t.ytplayer.getPlaybackQuality!=e&&(t.ytplayer.setPlaybackQuality(e),t.ytplayer.getPlaybackQuality()),$("#qS").toggleClass("hide")},mute_video:function(){t.ytplayer.isMuted()?(t.ytplayer.unMute(),d.choose_button(t.ytplayer.getVolume(),!1)):(d.choose_button(0,!0),t.ytplayer.mute())},setVolume:function(e){t.ytplayer.setVolume(e),d.choose_button(e,!1),t.ytplayer.isMuted()&&t.ytplayer.unMute()},choose_button:function(e,t){t?(1==document.getElementById("v-full").className.split(" ").length&&$("#v-full").toggleClass("hide"),1==document.getElementById("v-medium").className.split(" ").length&&$("#v-medium").toggleClass("hide"),1==document.getElementById("v-low").className.split(" ").length&&$("#v-low").toggleClass("hide"),2==document.getElementById("v-mute").className.split(" ").length&&$("#v-mute").toggleClass("hide")):e>=0&&33>=e?(1==document.getElementById("v-full").className.split(" ").length&&$("#v-full").toggleClass("hide"),1==document.getElementById("v-medium").className.split(" ").length&&$("#v-medium").toggleClass("hide"),2==document.getElementById("v-low").className.split(" ").length&&$("#v-low").toggleClass("hide"),1==document.getElementById("v-mute").className.split(" ").length&&$("#v-mute").toggleClass("hide")):e>=34&&66>=e?(1==document.getElementById("v-full").className.split(" ").length&&$("#v-full").toggleClass("hide"),2==document.getElementById("v-medium").className.split(" ").length&&$("#v-medium").toggleClass("hide"),1==document.getElementById("v-low").className.split(" ").length&&$("#v-low").toggleClass("hide"),1==document.getElementById("v-mute").className.split(" ").length&&$("#v-mute").toggleClass("hide")):e>=67&&100>=e&&(2==document.getElementById("v-full").className.split(" ").length&&$("#v-full").toggleClass("hide"),1==document.getElementById("v-medium").className.split(" ").length&&$("#v-medium").toggleClass("hide"),1==document.getElementById("v-low").className.split(" ").length&&$("#v-low").toggleClass("hide"),1==document.getElementById("v-mute").className.split(" ").length&&$("#v-mute").toggleClass("hide"))},playPause:function(){state=t.ytplayer.getPlayerState(),button=document.getElementById("playpause"),1==state?t.ytplayer.pauseVideo():2==state&&t.ytplayer.playVideo()},volumeOptions:function(){t.ytplayer.isMuted()?(t.ytplayer.unMute(),w=t.ytplayer.getVolume(),$("#volume").slider("value",t.ytplayer.getVolume())):(t.ytplayer.mute(),$("#volume").slider("value",0))},hoverMute:function(e){w=t.ytplayer.getVolume()}},c={empty:!1,channel_listener:function(){a.on("channel",function(e){c.channel_function(e)})},channel_function:function(e){switch(e[0]){case"list":c.populate_list(e[1]);break;case"added":c.added_song(e[1]);break;case"deleted":c.deleted_song(e[1]);break;case"vote":c.voted_song(e[1],e[2]);break;case"song_change":c.song_change(e[1])}},populate_list:function(e){void 0==y&&(y=$("#list-song-html").html()),full_playlist=e,c.sortList(),$("#wrapper").empty(),full_playlist.length>1?($.each(full_playlist,function(e,t){t.now_playing||$("#wrapper").append(c.generateSong(t,!1,h,!0))}),h&&(window.mobilecheck()?$(".list-image").lazyload({}):($(".list-image").lazyload({container:$("#wrapper")}).removeClass("lazy"),document.getElementById("wrapper").scrollTop+=1,document.getElementById("wrapper").scrollTop+=-1))):(c.empty=!0,$("#wrapper").append("The playlist is empty.")),$("#settings").css("visibility","visible"),$("#settings").css("opacity","1"),$("#wrapper").css("opacity","1")},added_song:function(e){full_playlist.push(e),c.sortList(),$("#suggested-"+e.id).remove(),c.empty&&($("#empty-channel-message").remove(),c.empty=!1),c.insertAtIndex(e,!0)},deleted_song:function(e){var t=c.getIndexOfSong(e),n=$("#wrapper").children()[t];try{n.style.height=0,setTimeout(function(){$("#"+e).remove(),full_playlist.splice(c.getIndexOfSong(e),1)},305),document.getElementById("wrapper").scrollTop+=1,document.getElementById("wrapper").scrollTop+=-1}catch(o){full_playlist.splice(c.getIndexOfSong(e),1),c.empty||$("#wrapper").children()[$("#wrapper").children().length-1].remove()}full_playlist.length<=2&&(c.empty=!0,$("#wrapper").append("The playlist is empty.")),$("#suggested-"+e).remove(),Suggestions.checkUserEmpty()},voted_song:function(e,t){var n=c.getIndexOfSong(e),o=full_playlist[n];full_playlist[n].votes+=1,full_playlist[n].added=t,c.sortList(),$("#"+e).remove(),c.insertAtIndex(o,!1)},song_change:function(e){var t=full_playlist.length-1;full_playlist[0].now_playing=!0,full_playlist[0].votes=0,full_playlist[0].guids=[],full_playlist[0].added=e,full_playlist[t].now_playing=!1;try{full_playlist.push(full_playlist.shift()),c.empty||$("#wrapper").children()[0].remove(),c.insertAtIndex(full_playlist[t-1],!1),document.getElementById("wrapper").scrollTop+=1,document.getElementById("wrapper").scrollTop+=-1}catch(n){}},vote:function(e,t){return a.emit("vote",[S,e,t,_]),!0},skip:function(){return a.emit("skip",{pass:_,id:l}),!0},importOldList:function(e){var t="",n=0;playlist_url="lists/"+e+".json",list=$.parseJSON($.ajax({type:"GET",url:playlist_url,async:!1}).responseText),$.each(list.songs,function(e,o){t+=o.id+",",n>45&&(Search.addVideos(t),t="",n=0),n++}),Search.addVideos(t),document.getElementById("search").value=""},sortList:function(){full_playlist.sort(n.predicate({name:"votes",reverse:!0},"added"))},show:function(){window.mobilecheck()||(showToggle?(showToggle=!1,$("#toptitle").empty(),$("#chan").addClass("bigChan"),$("#chan").html("zoff.no/"+S.toLowerCase())):(showToggle=!0,$("#toptitle").html("Zöff"),$("#chan").removeClass("bigChan"),$("#chan").html(S)))},insertAtIndex:function(e,t){i=c.getIndexOfSong(e.id),0===i?$("#wrapper").prepend(c.generateSong(e,t,!1,!0,!1)):$("#wrapper > div:nth-child("+i+")").after(c.generateSong(e,t,!1,!0,!1)),t&&setTimeout(function(){var e=$("#wrapper").children()[i];$(e).css("height",66)},5)},generateSong:function(e,t,n,o,a){var i,l,s=e.id,r=e.title,d=e.votes,c="background-image:url('//img.youtube.com/vi/"+s+"/mqdefault.jpg');",u=$(""+y+"
"),p="style";return t&&u.find("#list-song").css("height",0),f||u.find(".card-action").removeClass("hide"),1==d&&u.find(".vote-text").text("vote"),n&&(c="//img.youtube.com/vi/"+s+"/mqdefault.jpg",p="data-original"),o?(u.find(".list-votes").text(d),u.find("#list-song").attr("id",s),u.find(".vote-container").attr("title",r),i=".vote-container",l="del"):o||(u.find(".vote-text").text(e.duration),i=".add-suggested",l=a?"del_user_suggested":"del_suggested",u.find(".vote-container").attr("class","clickable add-suggested"),u.find(".add-suggested").attr("title",r),u.find("#del").attr("id",l),u.find(i).attr("data-video-title",r),u.find(i).attr("data-video-length",e.length),u.find("#list-song").attr("id","suggested-"+s),u.find(".list-image").attr("class",u.find(".list-image").attr("class").replace("list-image","list-suggested-image"))),u.find(".list-title").text(r),u.find(".list-title").attr("title",r),u.find(i).attr("data-video-id",s),u.find(".list-image").attr(p,c),u.find(".list-suggested-image").attr(p,c),u.find("#"+l).attr("data-video-id",s),u.html()},getIndexOfSong:function(e){return indexes=$.map(full_playlist,function(t,n){return t.id==e?n:void 0}),indexes[0]},scrollTop:function(){$("#wrapper").scrollTop(0)},scrollBottom:function(){$("#wrapper").scrollTop($("#wrapper")[0].scrollHeight)}},u="",p=!1,m=!1,y=$("#list-song-html").html(),f=!0,h=!1,v=!0,w=100,_="",k=!1,C=!1,I=window.location.hash.substring(1).split("&"),S=I[0],T=!1,E={"sync disconnect on unload":!0,secure:!0,"force new connection":!0};$(document).ready(function(){2==I.length&&"autoplay"==I[1]?T=!0:p=!0,$("head").append(''),$("head").append(''),add="https://zoff.no",a=io.connect(""+add+":8880",E),a.on("get_list",function(){setTimeout(function(){a.emit("list",S.toLowerCase())},1e3)}),a.on("viewers",function(e){viewers=e,void 0!==u&&t.getTitle(u,viewers)}),t.setup_youtube_listener(S),c.channel_listener(),window.onYouTubeIframeAPIReady=t.onYouTubeIframeAPIReady,t.loadPlayer(),d.initSlider(),window.setVolume=e}),$(document).on("click","#zoffbutton",function(e){window.open("https://zoff.no/"+S.toLowerCase()+"/","_blank")}),$(document).on("click",".vote-container",function(e){var t=$(this).attr("data-video-id");c.vote(t,"pos")})}();
\ No newline at end of file
diff --git a/static/dist/main.min.js b/static/dist/main.min.js
index f199abc8..597d5411 100755
--- a/static/dist/main.min.js
+++ b/static/dist/main.min.js
@@ -1,2 +1,2952 @@
-!function(){function e(){P=$("#chan").html(),p=window.mobilecheck(),window.onpopstate=function(e){o()},t(),"zoff.no"==window.location.hostname?add="https://zoff.no":add="localhost",void 0!=pe&&(pe.stopInterval=!1),localStorage.list_update&&"13.06.15"==localStorage.list_update||(localStorage.setItem("list_update","13.06.15"),window.location.reload(!0)),$("ul.playlist-tabs").tabs(),$("ul.playlist-tabs-loggedIn").tabs(),$(".chatTabs").tabs(),$("#settings").sideNav({menuWidth:300,edge:"right",closeOnClick:!1}),$(".collapsible").collapsible({accordion:!0}),d=$("#temp-results-container"),u=$("#empty-results-container").html(),$(".video-container").resizable({start:function(e,t){$("iframe").css("pointer-events","none")},stop:function(e,t){$("iframe").css("pointer-events","auto"),l.set_width($(this).width())},handles:"e",minWidth:350}),M=io.connect(""+add+":8880",le),pe.setup_youtube_listener(P),i.admin_listener(),z.channel_listener(),M.on("get_list",function(){M.emit("list",P.toLowerCase())}),M.on("suggested",function(e){var t=!0;void 0==e.id&&(t=!1),he.catchUserSuggests(e,t)}),M.on("viewers",function(e){C=e,void 0!==E&&pe.getTitle(E,C)}),/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream?(document.getElementById("search").blur(),pe.readyLooks()):(window.onYouTubeIframeAPIReady=pe.onYouTubeIframeAPIReady,pe.loadPlayer()),s.setup_chat_listener(P),s.allchat_listener(),window.mobilecheck()||L.host_listener(),c.msieversion()||Notification.requestPermission(),de=$.ajax({type:"GET",url:"https://api.github.com/repos/zoff-music/zoff/commits",async:!1}).responseText,de=$.parseJSON(de),$("#latest-commit").html("Latest Commit: 
"+de[0].commit.author.date.substring(0,10)+": "+de[0].committer.login+"
"+de[0].sha.substring(0,10)+": "+de[0].commit.message+"
'),$("#search").attr("placeholder","Find song on YouTube...")}function t(){$("#facebook-code-link").attr("href","https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/"+P.toLowerCase()),$("#facebook-code-link").attr("onclick","window.open('https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/"+P.toLowerCase()+"', 'Share Playlist','width=600,height=300'); return false;"),$("#twitter-code-link").attr("href","http://twitter.com/intent/tweet?url=https://zoff.no/"+P.toLowerCase()+"&text=Check%20out%20this%20playlist%20"+P.toLowerCase()+"%20on%20Zöff!&via=zoffmusic"),$("#twitter-code-link").attr("onclick","window.open('http://twitter.com/intent/tweet?url=https://zoff.no/"+P.toLowerCase()+"/&text=Check%20out%20this%20playlist%20"+P.toLowerCase()+"%20on%20Zöff!&via=zoffmusic','Share Playlist','width=600,height=300'); return false;"),$("#qr-code-link").attr("href","//chart.googleapis.com/chart?chs=500x500&cht=qr&chl=https://zoff.no/"+P.toLowerCase()+"&choe=UTF-8&chld=L%7C1"),$("#qr-code-image-link").attr("src","//chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://zoff.no/"+P.toLowerCase()+"&choe=UTF-8&chld=L%7C1")}function o(){var e=window.location.href.split("/");"#!"==e[3].substr(0,1)||""==e[3]||5==e.length&&"#"==e[4].substr(0,1)?""==e[3]&&($("#channel-load").css("display","block"),window.scrollTo(0,0),pe.stopInterval=!0,i.display_logged_out(),i.beginning=!0,P="",X=!1,ae=!1,$("#embed-button").css("display","none"),M.removeAllListeners(),$.ajax({url:"php/nochan.php",success:function(e){M.disconnect(),document.getElementById("volume-button").removeEventListener("click",me.mute_video),document.getElementById("playpause").removeEventListener("click",me.play_pause),document.getElementById("fullscreen").removeEventListener("click",me.fullscreen),I="",E="",$("meta[name=theme-color]").attr("content","#2D2D2D"),pe.ytplayer.destroy(),$(".drag-target").remove(),$("#sidenav-overlay").remove(),$("main").attr("class","center-align container"),$("body").attr("id",""),$("body").attr("style",""),$("header").html($($(e)[57]).html()),$($(e)[59]).insertAfter("header"),$($(e)[61]).insertAfter(".mega"),$("main").html($($(e)[65]).html()),$(".page-footer").removeClass("padding-bottom-extra"),$(".page-footer").removeClass("padding-bottom-novideo"),$("#favicon").attr("href","static/images/favicon.png"),1==$("#alreadyfp").length?window.initfp():(window.fromChannel=!0,window.initfp()),0==$("#alreadychannel").length&&$("head").append(" ok",1e4);var o=0;document.getElementById("zicon").addEventListener("click",function(){o+=10,document.getElementById("zicon").style.paddingLeft=o+"%",o>=100&&(window.location.href="http://etys.no")}),!window.mobilecheck()&&ue.winter&&ue.start_snowfall(),de=$.ajax({type:"GET",url:"https://api.github.com/repos/zoff-music/zoff/commits",async:!1}).responseText,de=$.parseJSON(de),$("#latest-commit").html("Latest Commit: 
"+de[0].commit.author.date.substring(0,10)+": "+de[0].committer.login+"
"+de[0].sha.substring(0,10)+": "+de[0].commit.message+"
150||(e.value.startsWith("/name ")?s.namechange(e.value.substring(6)):e.value.startsWith("/removename")?s.removename():"#all_chat"==$(".chat-tab-li a.active").attr("href")?M.emit("all,chat",e.value):M.emit("chat",e.value),e.value="")},allchat_listener:function(){M.on("chat.all",function(e){D||":"!=e[1].substring(0,1)||ie||($("#favicon").attr("href","static/images/highlogo.png"),D=!0,q=!0,se=!0,re||s.chat_blink()),document.hidden&&$("#favicon").attr("href","static/images/highlogo.png");var t=c.intToARGB(c.hashCode(e[0]));if(t.length<6)for(x=t.length;x<6;x++)t="0"+t;t=c.hexToRgb(t.substring(0,6));var o=c.rgbToHsl([t.r,t.g,t.b],!1);$("#chatall").append(""+e[0]+"");var n=document.createTextNode(e[1]);$("#chatall li:last")[0].appendChild(n),document.getElementById("chatall").scrollTop=document.getElementById("chatall").scrollHeight})},setup_chat_listener:function(e){M.on("chat",function(e){D||":"!=e[1].substring(0,1)||ie||($("#favicon").attr("href","static/images/highlogo.png"),q=!0,se=!0,re||s.chat_blink());var t=c.intToARGB(c.hashCode(e[0]));if(t.length<6)for(x=t.length;x<6;x++)t="0"+t;t=c.hexToRgb(t.substring(0,6));var o=c.rgbToHsl([t.r,t.g,t.b],!1);$("#chatchannel").append(""+e[0]+"");var n=document.createTextNode(e[1]);$("#chatchannel li:last")[0].appendChild(n),document.getElementById("chatchannel").scrollTop=document.getElementById("chatchannel").scrollHeight})},chat_blink:function(){re=!0,$(".chat-link").attr("style","color: grey !important;"),setTimeout(function(){$(".chat-link").attr("style","color: white !important;"),setTimeout(function(){re&&s.chat_blink()},1e3)},1e3)}},l={conf_pass:void 0,init:function(){document.cookie=P.toLowerCase()+"=; path=/"+P.toLowerCase()+"; expires="+new Date(0).toUTCString();try{conf_arr=l.decrypt(l.getCookie("_opt"),"_opt")}catch(e){conf_arr=l.decrypt(l.create_cookie("_opt"),"_opt")}try{l.conf_pass=l.decrypt(l.getCookie(P.toLowerCase()),P.toLowerCase())}catch(e){l.conf_pass=l.decrypt(l.create_cookie(P.toLowerCase()),P.toLowerCase())}L.change_enabled(conf_arr.remote),100!=conf_arr.width&&pe.set_width(conf_arr.width),void 0!=conf_arr.name&&""!=conf_arr.name&&s.namechange(conf_arr.name)},decrypt:function(e,t){void 0===l.getCookie(t)&&(e=l.create_cookie(t));var o=CryptoJS.AES.decrypt(e,navigator.userAgent+navigator.languages,{mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return $.parseJSON(o.toString(CryptoJS.enc.Utf8))},decrypt_pass:function(e){var t=CryptoJS.AES.decrypt(e,M.id,{mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return t.toString(CryptoJS.enc.Utf8)},encrypt:function(e,t){var o=JSON.stringify(e),n=CryptoJS.AES.encrypt(o,navigator.userAgent+navigator.languages,{mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}),a=new Date;a.setFullYear(a.getFullYear()+1),document.cookie=t+"="+n.toString()+";expires="+a.toGMTString()+";path=/;"},encrypt_string:function(e){var t=CryptoJS.AES.encrypt(e,M.id,{mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return t.toString()},get_volume:function(){return l.decrypt(l.getCookie("_opt"),"_opt").volume},set_volume:function(e){conf_arr.volume=e,l.encrypt(conf_arr,"_opt")},create_cookie:function(e){"_opt"==e?cookie_object={volume:100,width:100,remote:!0,name:""}:cookie_object={passwords:{}};var t=JSON.stringify(cookie_object),o=CryptoJS.AES.encrypt(t,navigator.userAgent+navigator.languages,{mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7}),n=new Date;return n.setFullYear(n.getFullYear()+1),document.cookie=e+"="+o.toString()+";expires="+n.toGMTString()+";path=/;",l.getCookie(e)},set_pass:function(e,t){l.conf_pass.passwords[e]=t,l.encrypt(l.conf_pass,e)},remove_pass:function(e){delete l.conf_pass.passwords[e],l.encrypt(l.conf_pass,e.toLowerCase())},set_name:function(e){conf_arr.name=e,l.encrypt(conf_arr,"_opt")},remove_name:function(){conf_arr.name="",l.encrypt(conf_arr,"_opt")},get_pass:function(e){return void 0!=l.conf_pass?l.conf_pass.passwords[e]:void 0},set_remote:function(e){conf_arr.remote=e,l.encrypt(conf_arr,"_opt")},get_remote:function(e){return conf_arr.remote},crypt_pass:function(e){var t=CryptoJS.AES.encrypt(e,M.id,{mode:CryptoJS.mode.CBC,padding:CryptoJS.pad.Pkcs7});return t.toString()},get_width:function(){return conf_arr.width},set_width:function(e){conf_arr.width=e,l.encrypt(conf_arr,"_opt")},getCookie:function(e){var t="; "+document.cookie,o=t.split("; "+e+"=");return 2==o.length?o.pop().split(";").shift():void 0}};window.mobilecheck=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e};var c={rnd:function(e){return e[Math.floor(Math.random()*e.length)]},predicate:function(){for(var e,t,o,n=[],a=arguments.length,i=function(e,t){return e===t?0:t>e?-1:1},s=function(e,t){var o=i,n=i;return e&&(n=function(t,n){return o(e(t),e(n))}),t?function(e,t){return-1*n(e,t)}:n},r=0;a>r;r++)e=arguments[r],"string"==typeof e?(t=e,o=i):(t=e.name,o=s(e.primer,e.reverse)),n.push({name:t,cmp:o});return function(t,o){for(var i,s,r=0;a>r&&(s=0,e=n[r],i=e.name,s=e.cmp(t[i],o[i]),0===s);r++);return s}},hashCode:function(e){for(var t=0,o=0;o>24&255).toString(16)+(e>>16&255).toString(16)+(e>>8&255).toString(16)+(255&e).toString(16)},hexToRgb:function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},pad:function(e){return 10>e?"0"+Math.floor(e):Math.floor(e)},contains:function(e,t){for(var o=e.length;o--;)if(e[o]===t)return!0;return!1},sample:function(){Date.now()-K>=2*Q&&(M.removeAllListeners(),M.disconnect(),M.connect(),pe.setup_all_listeners()),K=Date.now(),setTimeout(c.sample,Q)},loadjsfile:function(e){if(-1==J.indexOf("["+e+"]")){var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",e),document.getElementsByTagName("head")[0].appendChild(t),J+="["+e+"]"}},msieversion:function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");return t>0||navigator.userAgent.match(/Trident.*rv\:11\./)?!0:!1},getRandomInt:function(e,t){return Math.floor(Math.random()*(t-e))+e},rgbToHsl:function(e,t){r=e[0],g=e[1],b=e[2],r/=255,g/=255,b/=255;var o,n,a=Math.max(r,g,b),i=Math.min(r,g,b),s=(a+i)/2;if(a==i)o=n=0;else{var l=a-i;switch(n=s>.5?l/(2-a-i):l/(a+i),a){case r:o=(g-b)/l+(g.5&&t?s=.5:.65>s&&!t&&(s=.65),"hsl("+Math.floor(360*o)+", "+Math.floor(100*n)+"%, "+Math.floor(100*s)+"%)"},componentToHex:function(e){var t=e.toString(16);return 1==t.length?"0"+t:t},rgbToHex:function(e,t,o){return"#"+c.componentToHex(e)+c.componentToHex(t)+c.componentToHex(o)},upperFirst:function(e){return e.substring(0,1).toUpperCase()+e.substring(1).toLowerCase()},addClass:function(e,t){c.contains($(e).attr("class").split(" "),t)||$(e).addClass(t)},send_mail:function(e,t){if(""!=e&&""!=t){$("#submit-contact-form").addClass("hide"),$("#send-loader").removeClass("hide"),$("#contact-form-from").attr("disabled","true"),$("#contact-form-message").attr("disabled","true");var e=$("#contact-form-from").val(),t=$("#contact-form-message").val();$("#contact-container").empty(),newWindow=window.open("mailto:contact@zoff.no?Subject=Contact%20Zoff&Body="+t,"_blank"),$("#contact-container").html("Something went wrong, sorry about that. You could instead try with your own mail-client: contact@zoff.no"),setTimeout(function(){newWindow.close()},500)}}};$(document).on("submit","#contact-form",function(e){e.preventDefault();var t=$("#contact-form-message").val(),o=$("#contact-form-from").val();c.send_mail(o,t)}),Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var e=0,t=this.length;t>e;e++)this[e]&&this[e].parentElement&&this[e].parentElement.removeChild(this[e])},String.prototype.startsWith=function(e,t){return t=t||0,this.indexOf(e,t)===t};var d,u,p,m,h,f,y,v,w,k,_,C,I,S,T,E,B,M,L={enabled:!0,host_listener:function(){var e;M.on("id",function(t){void 0===e?e=t:(M.removeAllListeners(t),X=!1,e=t);var o="https://remote."+window.location.hostname+"/"+t;$("#code-text").text(t),$("#code-qr").attr("src","https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+o),$("#code-link").attr("href",o),X||(X=!0,M.on(t,function(e){enabled&&("volume"==e[0]?($("#volume").slider("value",e[1]),pe.ytplayer.setVolume(e[1]),localStorage.setItem("volume",e[1]),me.choose_button(e[1],!1)):"channel"==e[0]?(M.emit("change_channel"),i.beginning=!0,P=e[1].toLowerCase(),$("#chan").html(c.upperFirst(P)),N=!0,M.emit("list",P.toLowerCase()),window.history.pushState("object or string","Title","/"+P.toLowerCase())):"pause"==e[0]?pe.ytplayer.pauseVideo():"play"==e[0]?pe.ytplayer.playVideo():"skip"==e[0]&&z.skip())}))}),$("input[class=remote_switch_class]").change(function(){enabled=document.getElementsByName("remote_switch")[0].checked,l.set_remote(enabled)})},change_enabled:function(e){enabled=e,document.getElementsByName("remote_switch")[0].checked=enabled}},z={empty:!1,channel_listener:function(){M.on("channel",function(e){z.channel_function(e)})},channel_function:function(e){switch(e[0]){case"list":z.populate_list(e[1]);break;case"added":z.added_song(e[1]);break;case"deleted":z.deleted_song(e[1]);break;case"vote":z.voted_song(e[1],e[2]);break;case"song_change":z.song_change(e[1])}},populate_list:function(e){void 0==j&&(j=$("#list-song-html").html()),f=e,z.sortList(),$("#wrapper").empty(),f.length>1?($.each(f,function(e,t){t.now_playing||$("#wrapper").append(z.generateSong(t,!1,te,!0))}),te&&(window.mobilecheck()?$(".list-image").lazyload({}):($(".list-image").lazyload({container:$("#wrapper")}).removeClass("lazy"),document.getElementById("wrapper").scrollTop+=1,document.getElementById("wrapper").scrollTop+=-1))):(z.empty=!0,$("#wrapper").append("The playlist is empty.")),$("#settings").css("visibility","visible"),$("#settings").css("opacity","1"),$("#wrapper").css("opacity","1")},added_song:function(e){f.push(e),z.sortList(),$("#suggested-"+e.id).remove(),z.empty&&($("#empty-channel-message").remove(),z.empty=!1),z.insertAtIndex(e,!0)},deleted_song:function(e){var t=z.getIndexOfSong(e),o=$("#wrapper").children()[t];try{o.style.height=0,setTimeout(function(){$("#"+e).remove(),f.splice(z.getIndexOfSong(e),1)},305),document.getElementById("wrapper").scrollTop+=1,document.getElementById("wrapper").scrollTop+=-1}catch(n){f.splice(z.getIndexOfSong(e),1),z.empty||$("#wrapper").children()[$("#wrapper").children().length-1].remove()}f.length<=2&&(z.empty=!0,$("#wrapper").append("The playlist is empty.")),$("#suggested-"+e).remove(),he.checkUserEmpty()},voted_song:function(e,t){var o=z.getIndexOfSong(e),n=f[o];f[o].votes+=1,f[o].added=t,z.sortList(),$("#"+e).remove(),z.insertAtIndex(n,!1)},song_change:function(e){var t=f.length-1;f[0].now_playing=!0,f[0].votes=0,f[0].guids=[],f[0].added=e,f[t].now_playing=!1;try{f.push(f.shift()),z.empty||$("#wrapper").children()[0].remove(),z.insertAtIndex(f[t-1],!1),document.getElementById("wrapper").scrollTop+=1,document.getElementById("wrapper").scrollTop+=-1}catch(o){}},vote:function(e,t){return M.emit("vote",[P,e,t,U]),!0},skip:function(){return M.emit("skip",{pass:U,id:I}),!0},importOldList:function(e){var t="",o=0;playlist_url="lists/"+e+".json",S=$.parseJSON($.ajax({type:"GET",url:playlist_url,async:!1}).responseText),$.each(S.songs,function(e,n){t+=n.id+",",o>45&&(ge.addVideos(t),t="",o=0),o++}),ge.addVideos(t),document.getElementById("search").value=""},sortList:function(){f.sort(c.predicate({name:"votes",reverse:!0},"added"))},show:function(){window.mobilecheck()||(V?(V=!1,$("#toptitle").empty(),$("#chan").addClass("bigChan"),$("#chan").html("zoff.no/"+P.toLowerCase())):(V=!0,$("#toptitle").html("Zöff"),$("#chan").removeClass("bigChan"),$("#chan").html(P)))},insertAtIndex:function(e,t){ee=z.getIndexOfSong(e.id),0===ee?$("#wrapper").prepend(z.generateSong(e,t,!1,!0,!1)):$("#wrapper > div:nth-child("+ee+")").after(z.generateSong(e,t,!1,!0,!1)),t&&setTimeout(function(){var e=$("#wrapper").children()[ee];$(e).css("height",66)},5)},generateSong:function(e,t,o,n,a){var i,s,r=e.id,l=e.title,c=e.votes,d="background-image:url('//img.youtube.com/vi/"+r+"/mqdefault.jpg');",u=$(""+j+"
"),p="style";return t&&u.find("#list-song").css("height",0),N||u.find(".card-action").removeClass("hide"),1==c&&u.find(".vote-text").text("vote"),o&&(d="//img.youtube.com/vi/"+r+"/mqdefault.jpg",p="data-original"),n?(u.find(".list-votes").text(c),u.find("#list-song").attr("id",r),u.find(".vote-container").attr("title",l),i=".vote-container",s="del"):n||(u.find(".vote-text").text(e.duration),i=".add-suggested",s=a?"del_user_suggested":"del_suggested",u.find(".vote-container").attr("class","clickable add-suggested"),u.find(".add-suggested").attr("title",l),u.find("#del").attr("id",s),u.find(i).attr("data-video-title",l),u.find(i).attr("data-video-length",e.length),u.find("#list-song").attr("id","suggested-"+r),u.find(".list-image").attr("class",u.find(".list-image").attr("class").replace("list-image","list-suggested-image"))),u.find(".list-title").text(l),u.find(".list-title").attr("title",l),u.find(i).attr("data-video-id",r),u.find(".list-image").attr(p,d),u.find(".list-suggested-image").attr(p,d),u.find("#"+s).attr("data-video-id",r),u.html()},getIndexOfSong:function(e){return indexes=$.map(f,function(t,o){return t.id==e?o:void 0}),indexes[0]},scrollTop:function(){$("#wrapper").scrollTop(0)},scrollBottom:function(){$("#wrapper").scrollTop($("#wrapper")[0].scrollHeight)}},P=$("#chan").html(),N=!0,A=0,V=!0,j=$("#list-song-html").html(),D=!1,q=!1,R="***REMOVED***",O=!1,H=/P((([0-9]*\.?[0-9]*)Y)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)W)?(([0-9]*\.?[0-9]*)D)?)?(T(([0-9]*\.?[0-9]*)H)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)S)?)?/,y=[],Y=0,F=1,U="",J="",G=!1,C=1,Z=!1,W=!1,Q=6e3,K=Date.now(),X=!1,ee=-1,te=!0,oe=!1,ne=!0,ae=!1,ie=!1,se=!1,re=!1,le={"sync disconnect on unload":!0,secure:!0,"force new connection":!0};$().ready(function(){window.fromFront||"/"==window.location.pathname||e()}),window.init=e,$(document).keyup(function(e){if(27==event.keyCode)$("#results").html(""),c.contains($("#search-wrapper").attr("class").split(" "),"hide")||$("#search-wrapper").toggleClass("hide"),c.contains($("#song-title").attr("class").split(" "),"hide")&&$("#song-title").toggleClass("hide"),"mdi-navigation-close"==$("#search-btn i").attr("class")&&($("#search-btn i").toggleClass("mdi-navigation-close"),$("#search-btn i").toggleClass("mdi-action-search")),$("#results").toggleClass("hide");else if($("div.result").length>2)if(children=$("#mock-div").children(),40==e.keyCode)$(children[ee-1]).removeClass("hoverResults"),$(children[ee]).addClass("hoverResults"),ee1&&ee--,$(children[ee]).removeClass("hoverResults"),$(children[ee-1]).addClass("hoverResults");else if(13==e.keyCode){ee=0;var t=document.getElementsByClassName("hoverResults")[0];"function"==typeof t.onclick&&t.onclick.apply(t),$("div.hoverResults").removeClass("hoverResults"),
-$("#results").html(""),document.getElementById("search").value=""}}),$("input[class=conf]").change(function(){i.save()}),$("#clickme").click(function(){pe.ytplayer.playVideo()}),$("#listImport").on("submit",function(){ge.importPlaylist(document.getElementById("import").value)}),$(window).focus(function(){$("#favicon").attr("href","static/images/favicon.png"),q=!1}),$(document).on("change","#autoplay",function(){this.checked?$("#embed-area").val('