mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
even more nullchecks
This commit is contained in:
@@ -22,6 +22,7 @@ var Hostcontroller = {
|
|||||||
window.parentWindow.postMessage({type: "controller", id: id}, window.parentOrigin);
|
window.parentWindow.postMessage({type: "controller", id: id}, window.parentOrigin);
|
||||||
}
|
}
|
||||||
} else if(!embed) {
|
} else if(!embed) {
|
||||||
|
if(window.location.pathname == "/") return;
|
||||||
document.querySelector("#code-text").innerText = id;
|
document.querySelector("#code-text").innerText = id;
|
||||||
document.querySelector("#code-qr").setAttribute("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+codeURL);
|
document.querySelector("#code-qr").setAttribute("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+codeURL);
|
||||||
document.querySelector("#code-link").setAttribute("href", codeURL);
|
document.querySelector("#code-link").setAttribute("href", codeURL);
|
||||||
@@ -36,12 +37,15 @@ var Hostcontroller = {
|
|||||||
if(client) return;
|
if(client) return;
|
||||||
if(enabled){
|
if(enabled){
|
||||||
if(arr.type == "volume") {
|
if(arr.type == "volume") {
|
||||||
Playercontrols.visualVolume(arr.value);
|
try {
|
||||||
Player.setVolume(arr.value);
|
Playercontrols.visualVolume(arr.value);
|
||||||
Player.soundcloud_player.setVolume(arr.value / 100);
|
Player.setVolume(arr.value);
|
||||||
localStorage.setItem("volume", arr.value);
|
Player.soundcloud_player.setVolume(arr.value / 100);
|
||||||
Playercontrols.choose_button(arr.value, false);
|
localStorage.setItem("volume", arr.value);
|
||||||
|
Playercontrols.choose_button(arr.value, false);
|
||||||
|
} catch(e) {}
|
||||||
} else if(arr.type == "channel") {
|
} else if(arr.type == "channel") {
|
||||||
|
if(window.location.pathname == "/") return;
|
||||||
socket.emit("change_channel");
|
socket.emit("change_channel");
|
||||||
Admin.beginning = true;
|
Admin.beginning = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user