diff --git a/js/conf/Debug.js b/js/conf/Debug.js index aa4de47..a93499c 100644 --- a/js/conf/Debug.js +++ b/js/conf/Debug.js @@ -1,6 +1,6 @@ // Set prod to true when releasing -// _prod = true; -_prod = false; +_prod = true; +// _prod = false; Debug = { debug: true, diff --git a/js/conf/Settings.js b/js/conf/Settings.js index 16b426e..acb4bed 100644 --- a/js/conf/Settings.js +++ b/js/conf/Settings.js @@ -54,6 +54,14 @@ var _se_reload = function(){ this.init(true); } +var _se_isBlacklisted = function(site){ + return this.blacklist.indexOf(site) > -1; +} + +var _se_isWhitelisted = function(site){ + return this.whitelist.indexOf(site) > -1; +} + var Settings = { arDetect: { enabled: "global", // thats my csgo rank kappa @@ -81,6 +89,8 @@ var Settings = { }, whitelist: [], blacklist: ["vimeo.com"], + isBlacklisted: _se_isBlacklisted, + isWhitelisted: _se_isWhitelisted, init: _se_init, save: _se_save, reload: _se_reload, diff --git a/js/lib/PlayerDetect.js b/js/lib/PlayerDetect.js index f2cda9a..13e4b74 100644 --- a/js/lib/PlayerDetect.js +++ b/js/lib/PlayerDetect.js @@ -40,7 +40,12 @@ var _pd_getPlayerDimensions = function(element){ height: screen.height }; } - + if(element == null){ + if(Debug.debug) + console.log("[PlayerDetect::_pd_getPlayerDimensions] element is not valid, doing nothing.", element) + + return; + } var playerCandidateNode = element; // in case our