Leaving fixes

This commit is contained in:
Kasper Rynning-Tønnesen
2016-05-09 15:45:56 +02:00
parent 8f1499dacd
commit 3a5efd9009
3 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -219,7 +219,7 @@ var Nochan = {
}
},
to_channel: function(chan, popstate){
to_channel: function(new_channel, popstate){
$("#channel-load").css("display", "block");
window.scrollTo(0, 0);
@@ -227,20 +227,20 @@ var Nochan = {
if(window.mobilecheck()) socket.removeAllListeners();
$("body").css("background-color", "#2d2d2d");
$.ajax({
url: chan + "/php/index.php",
url: new_channel + "/php/index.php",
success: function(e){
if(Player.ytplayer != ""){
Player.ytplayer.destroy();
socket.emit("change_channel");
socket.emit("change_channel", {channel: chan.toLowerCase()});
}
$("#frontpage_player").empty();
if(window.mobilecheck()) socket.disconnect();
if(!popstate){
window.history.pushState("to the channel!", "Title", "/" + chan);
window.chan = chan;
window.history.pushState("to the channel!", "Title", "/" + new_channel);
window.chan = new_channel;
}
$(".mega").remove();