!function(){function t(){window.onpopstate=function(t){var e=window.location.href.split("/");""!=e[3]&&"#"!=e[3].substring(0,1)&&i.to_channel(e[3],!0)},e=$("#channel-list-container").html();var t={secure:!0,"force new connection":!0};"zoff.no"==window.location.hostname?add="https://zoff.no":add="localhost",o=io.connect(""+add+":8880",t),o.on("playlists",function(t){$("#channels").empty(),i.populate_channels(t.channels),i.set_viewers(t.viewers)}),o.emit("frontpage_lists"),$("#channel-load").css("display","none"),"#donation"==window.location.hash&&(window.location.hash="#",$("#donation").openModal()),localStorage.ok_cookie||Materialize.toast("We're using cookies to enhance your experience! ok",1e4);var a=0;document.getElementById("zicon").addEventListener("click",function(){a+=10,document.getElementById("zicon").style.paddingLeft=a+"%",a>=100&&(window.location.href="http://etys.no")}),!window.mobilecheck()&&i.winter&&i.start_snowfall(),n=$.ajax({type:"GET",url:"https://api.github.com/repos/zoff-music/zoff/commits",async:!1}).responseText,n=$.parseJSON(n),$("#latest-commit").html("Latest Commit:
"+n[0].commit.author.date.substring(0,10)+": "+n[0].committer.login+"
"+n[0].sha.substring(0,10)+": "+n[0].commit.message+"a){var c=t[x][1],s=t[x][0],l="background-image:url('https://img.youtube.com/vi/"+c+"/hqdefault.jpg');",m=t[x][4],d=pre_card;1==t[x][5]?(d.find(".pin").attr("style","display:block;"),d.find(".card").attr("title","Pinned!")):(d.find(".pin").attr("style","display:none;"),d.find(".card").attr("title","")),d.find(".chan-name").text(r),d.find(".chan-name").attr("title",r),d.find(".chan-views").text(s),d.find(".chan-songs").text(m),d.find(".chan-bg").attr("style",l),d.find(".chan-link").attr("href",r),$("#channels").append(d.html())}o+="