mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Debug function added
This commit is contained in:
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
4
static/dist/main.min.js
vendored
4
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -29,12 +29,9 @@ var chat_active = false;
|
|||||||
var chat_unseen = false;
|
var chat_unseen = false;
|
||||||
var blinking = false;
|
var blinking = false;
|
||||||
|
|
||||||
if(localStorage.debug != undefined){
|
if(localStorage.debug == undefined){
|
||||||
window.debug = localStorage.debug;
|
|
||||||
} else {
|
|
||||||
var debug = false;
|
var debug = false;
|
||||||
localStorage.debug = debug;
|
localStorage.debug = debug;
|
||||||
window.debug = debug;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var result_html;
|
var result_html;
|
||||||
@@ -63,8 +60,6 @@ var connection_options = {
|
|||||||
var fromFront = false;
|
var fromFront = false;
|
||||||
var fromChannel = false;
|
var fromChannel = false;
|
||||||
|
|
||||||
window.debug = debug;
|
|
||||||
|
|
||||||
$().ready(function(){
|
$().ready(function(){
|
||||||
if(!fromFront && window.location.pathname != "/") init();
|
if(!fromFront && window.location.pathname != "/") init();
|
||||||
else if(!fromChannel && window.location.pathname == "/"){
|
else if(!fromChannel && window.location.pathname == "/"){
|
||||||
@@ -248,6 +243,17 @@ function setup_host_listener(id){
|
|||||||
socket.on(id, Hostcontroller.host_on_action);
|
socket.on(id, Hostcontroller.host_on_action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function enable_debug(){
|
||||||
|
localStorage.debug = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function disable_debug(){
|
||||||
|
localStorage.debug = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.enable_debug = enable_debug;
|
||||||
|
window.disable_debug = disable_debug;
|
||||||
|
|
||||||
$(document).keyup(function(e) {
|
$(document).keyup(function(e) {
|
||||||
if(event.keyCode == 27){
|
if(event.keyCode == 27){
|
||||||
$("#results").html("");
|
$("#results").html("");
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ var Player = {
|
|||||||
youtube_listener: function(obj)
|
youtube_listener: function(obj)
|
||||||
{
|
{
|
||||||
Player.loaded = false;
|
Player.loaded = false;
|
||||||
if(window.debug){
|
if(localStorage.debug){
|
||||||
console.log("--------youtube_listener--------");
|
console.log("--------youtube_listener--------");
|
||||||
|
|
||||||
console.log("Received: ");
|
console.log("Received: ");
|
||||||
@@ -93,7 +93,7 @@ var Player = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
onPlayerStateChange: function(newState) {
|
onPlayerStateChange: function(newState) {
|
||||||
if(window.debug){
|
if(localStorage.debug){
|
||||||
console.log("-------onPlayerStateChange------");
|
console.log("-------onPlayerStateChange------");
|
||||||
console.log("New state\nState: ");
|
console.log("New state\nState: ");
|
||||||
console.log(newState);
|
console.log(newState);
|
||||||
|
|||||||
Reference in New Issue
Block a user