mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Trying to get frontpage to work
This commit is contained in:
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
2
static/dist/frontpage.min.js
vendored
2
static/dist/frontpage.min.js
vendored
File diff suppressed because one or more lines are too long
2
static/dist/main.min.js
vendored
2
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -441,9 +441,17 @@ function onepage_load(){
|
|||||||
$($(e)[39]).insertAfter(".mega");
|
$($(e)[39]).insertAfter(".mega");
|
||||||
$("main").html($($(e)[43]).html());
|
$("main").html($($(e)[43]).html());
|
||||||
|
|
||||||
if($("#alreadychannel").length == 0) $("head").append("<div id='alreadychannel'></div")
|
console.log($($(e)[63]).html());
|
||||||
if($("#alreadyfp").length == 1) window.initfp();
|
|
||||||
else $("#scripts").append($($(e)[63]).html());
|
if($("#alreadyfp").length == 1){
|
||||||
|
window.initfp();
|
||||||
|
}else {
|
||||||
|
$("#scripts").append($($(e)[63]).html());
|
||||||
|
}
|
||||||
|
|
||||||
|
if($("#alreadychannel").length == 0){
|
||||||
|
$("head").append("<div id='alreadychannel'></div")
|
||||||
|
}
|
||||||
$("#channel-load").css("display", "none");
|
$("#channel-load").css("display", "none");
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
|||||||
@@ -231,8 +231,6 @@ var Nochan = {
|
|||||||
|
|
||||||
//console.log($(e));
|
//console.log($(e));
|
||||||
|
|
||||||
delete Nochan
|
|
||||||
|
|
||||||
socket.disconnect();
|
socket.disconnect();
|
||||||
|
|
||||||
if(!popstate) window.history.pushState("to the channel!", "Title", "/" + chan + "/");
|
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";
|
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
||||||
else add = "localhost";
|
else add = "localhost";
|
||||||
socket = io.connect(''+add+':8880', connection_options);
|
socket = io.connect(''+add+':8880', connection_options);
|
||||||
socket.emit('frontpage_lists');
|
|
||||||
socket.on('playlists', function(msg){
|
socket.on('playlists', function(msg){
|
||||||
$("#channels").empty();
|
$("#channels").empty();
|
||||||
|
|
||||||
|
|
||||||
Nochan.populate_channels(msg.channels);
|
Nochan.populate_channels(msg.channels);
|
||||||
|
|
||||||
Nochan.set_viewers(msg.viewers);
|
Nochan.set_viewers(msg.viewers);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
socket.emit('frontpage_lists');
|
||||||
|
|
||||||
$("#channel-load").css("display", "none");
|
$("#channel-load").css("display", "none");
|
||||||
//Materialize.toast("<a href='/remote' style='color:white;'>Try out our new feature, remote!</a>", 8000)
|
//Materialize.toast("<a href='/remote' style='color:white;'>Try out our new feature, remote!</a>", 8000)
|
||||||
if(window.location.hash == "#donation")
|
if(window.location.hash == "#donation")
|
||||||
|
|||||||
Reference in New Issue
Block a user