From 4891efecb0d84c7be3646358b097d87806fb95cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Sun, 21 Feb 2016 18:26:42 +0100 Subject: [PATCH] Fixed faster loading between views --- index.php | 7 +- php/footer.php | 8 +- php/header.php | 11 +- static/dist/frontpage.min.js | 2 +- static/dist/main.min.js | 4 +- static/js/listeners.js | 258 +++++++++++++++++++---------------- static/js/nochan.js | 22 ++- 7 files changed, 177 insertions(+), 135 deletions(-) diff --git a/index.php b/index.php index 1d7a9d43..5a7d6576 100755 --- a/index.php +++ b/index.php @@ -273,11 +273,8 @@
- - - - - +
+ diff --git a/php/footer.php b/php/footer.php index 9cf307f3..fc2e0d7d 100755 --- a/php/footer.php +++ b/php/footer.php @@ -135,10 +135,4 @@   All Rights Reserved. - - - - - - - + \ No newline at end of file diff --git a/php/header.php b/php/header.php index f75dd7dd..80797e22 100755 --- a/php/header.php +++ b/php/header.php @@ -30,4 +30,13 @@ ga('create', '***REMOVED***', 'auto'); ga('send', 'pageview'); - \ No newline at end of file + + + + + + + + + + \ No newline at end of file diff --git a/static/dist/frontpage.min.js b/static/dist/frontpage.min.js index 311c2fc2..597fe8dd 100755 --- a/static/dist/frontpage.min.js +++ b/static/dist/frontpage.min.js @@ -1 +1 @@ -!function(){function e(){$("#facebook-code-link").attr("href","https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/"),$("#facebook-code-link").attr("onclick","window.open('https://www.facebook.com/sharer/sharer.php?u=https://zoff.no/', 'Share Zöff','width=600,height=300'); return false;"),$("#twitter-code-link").attr("href","http://twitter.com/intent/tweet?url=https://zoff.no/&text=Check%20out%20Zöff!&via=zoffmusic"),$("#twitter-code-link").attr("onclick","window.open('http://twitter.com/intent/tweet?url=https://zoff.no/&text=Check%20out%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/&choe=UTF-8&chld=L%7C1"),$("#qr-code-image-link").attr("src","//chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://zoff.no/&choe=UTF-8&chld=L%7C1")}function t(){window.onpopstate=function(e){var t=window.location.href.split("/");""!=t[3]&&"#"!=t[3].substring(0,1)&&s.to_channel(t[3],!0)},o=$("#channel-list-container").html(),e();var t={secure:!0,"force new connection":!0};"zoff.no"==window.location.hostname?add="https://zoff.no":add="localhost",a=io.connect(""+add+":8880",t),a.on("playlists",function(e){$("#channels").empty(),s.populate_channels(e.channels),s.set_viewers(e.viewers)}),a.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 i=0;document.getElementById("zicon").addEventListener("click",function(){i+=10,document.getElementById("zicon").style.paddingLeft=i+"%",i>=100&&(window.location.href="http://etys.no")}),!window.mobilecheck()&&s.winter&&s.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 r=e[x][1],l=e[x][0],c="background-image:url('https://img.youtube.com/vi/"+r+"/hqdefault.jpg');",d=e[x][4],u=pre_card;1==e[x][5]?(u.find(".pin").attr("style","display:block;"),u.find(".card").attr("title","Pinned!")):(u.find(".pin").attr("style","display:none;"),u.find(".card").attr("title","")),u.find(".chan-name").text(i),u.find(".chan-name").attr("title",i),u.find(".chan-views").text(l),u.find(".chan-songs").text(d),u.find(".chan-bg").attr("style",c),u.find(".chan-link").attr("href",i),$("#channels").append(u.html())}n+="