Rewriting stuff

This commit is contained in:
Kasper Rynning-Tønnesen
2018-02-27 11:26:31 +01:00
parent 370e9ae72b
commit d2b3759913
4 changed files with 39 additions and 3 deletions

View File

@@ -23,7 +23,12 @@ var Frontpage = {
msg
]);
Frontpage.all_channels = msg.channels;
Frontpage.populate_channels(msg.channels, true);
if(msg.channels.length == 0) {
$("#preloader").css("display", "none");
$("#channel-list-container").append("<p>No channels yet</p>");
} else {
Frontpage.populate_channels(msg.channels, true);
}
Frontpage.set_viewers(msg.viewers);
},

View File

@@ -9,6 +9,7 @@ var Player = {
np: {},
youtube_listener: function(obj) {
Helper.log(["object", obj]);
var state;
if(embed && obj.np) {
if(window.parentWindow && window.parentOrigin) {
@@ -42,7 +43,6 @@ var Player = {
}
Helper.log(["video_id variable: " + video_id]);
if(!obj.np){
$('#song-title').html("Empty channel. Add some songs!");
document.title = "Zoff - the shared YouTube based radio";