mirror of
https://github.com/KevinMidboe/zoff.git
synced 2026-01-10 19:45:34 +00:00
Updated mobile look, and fixed error where leaving channel before player initialized crashes
This commit is contained in:
@@ -72,15 +72,6 @@ if (navigator.serviceWorker) {
|
||||
console.log('Service Worker is not supported in this browser.');
|
||||
}
|
||||
|
||||
/*if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.getRegistration().then(function(r) {
|
||||
try {
|
||||
r.unregister();
|
||||
} catch(e) {}
|
||||
});
|
||||
}*/
|
||||
|
||||
|
||||
$().ready(function(){
|
||||
if(!fromFront && window.location.pathname != "/") init();
|
||||
else if(!fromChannel && window.location.pathname == "/"){
|
||||
@@ -713,8 +704,12 @@ function onepage_load(){
|
||||
$("#video-container").removeClass("no-opacity");
|
||||
$("#main-row").prepend("<div id='player_bottom_overlay' title='To Channel' class='ytplayer player_bottom'></div>");
|
||||
} else {
|
||||
Player.ytplayer.destroy();
|
||||
Player.ytplayer = "";
|
||||
try{
|
||||
Player.ytplayer.destroy();
|
||||
} catch(error){
|
||||
//No player to destroy
|
||||
}
|
||||
Player.ytplayer = "";
|
||||
document.title = "Zöff";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user