Trying to get frontpage to work

This commit is contained in:
Kasper Rynning-Tønnesen
2016-02-09 19:19:07 +01:00
parent 1971783bbd
commit d5751e1f0e
5 changed files with 18 additions and 9 deletions

View File

@@ -231,8 +231,6 @@ var Nochan = {
//console.log($(e));
delete Nochan
socket.disconnect();
if(!popstate) window.history.pushState("to the channel!", "Title", "/" + chan + "/");
@@ -283,15 +281,18 @@ function initfp(){
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
else add = "localhost";
socket = io.connect(''+add+':8880', connection_options);
socket.emit('frontpage_lists');
socket.on('playlists', function(msg){
$("#channels").empty();
Nochan.populate_channels(msg.channels);
Nochan.set_viewers(msg.viewers);
});
socket.emit('frontpage_lists');
$("#channel-load").css("display", "none");
//Materialize.toast("<a href='/remote' style='color:white;'>Try out our new feature, remote!</a>", 8000)
if(window.location.hash == "#donation")