Updated what to cache, and updated offline-page

This commit is contained in:
Kasper Rynning-Tønnesen
2016-08-15 16:05:21 +02:00
parent 3f152acc57
commit 85081497aa
16 changed files with 88 additions and 110 deletions

View File

@@ -6,7 +6,7 @@ var Hostcontroller = {
host_listener: function(id) {
if(Hostcontroller.old_id == null) Hostcontroller.old_id = id;
if(Hostcontroller.old_id === null) Hostcontroller.old_id = id;
else
{
socket.removeAllListeners(id);
@@ -14,7 +14,7 @@ var Hostcontroller = {
Hostcontroller.old_id = id;
}
var codeURL = "https://remote."+window.location.hostname+"/"+id;
$("#code-text").text(id)
$("#code-text").text(id);
$("#code-qr").attr("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+codeURL);
$("#code-link").attr("href", codeURL);
if(!began)
@@ -48,7 +48,7 @@ var Hostcontroller = {
window.history.pushState("object or string", "Title", "/"+chan.toLowerCase());
}else if(arr[0] == "pause")
Player.ytplayer.pauseVideo()
Player.ytplayer.pauseVideo();
else if(arr[0] == "play")
Player.ytplayer.playVideo();
else if(arr[0] == "skip")
@@ -60,4 +60,4 @@ var Hostcontroller = {
enabled = val;
document.getElementsByName("remote_switch")[0].checked = enabled;
}
}
};