ultrawidify/js/conf/Debug.js

49 lines
953 B
JavaScript
Raw Normal View History

2017-12-31 18:26:59 +01:00
// Set prod to true when releasing
2018-09-13 23:47:20 +02:00
// _prod = true;
_prod = false;
2017-12-31 18:26:59 +01:00
Debug = {
debug: true,
keyboard: true,
debugResizer: true,
debugArDetect: true,
debugStorage: false,
comms: false,
// showArDetectCanvas: true,
flushStoredSettings: true,
// flushStoredSettings: false,
2018-04-22 17:10:36 +02:00
playerDetectDebug: true,
periodic: true,
videoRescan: true,
arDetect: {
edgeDetect: true
2018-04-11 19:59:00 +02:00
},
canvas: {
2018-04-22 17:10:36 +02:00
debugDetection: true
},
debugCanvas: {
// enabled: true,
// guardLine: true
enabled: false,
guardLine: false
}
}
2017-12-31 18:26:59 +01:00
if(_prod){
2018-05-02 17:52:25 +02:00
__disableAllDebug(Debug);
}
function __disableAllDebug(obj) {
for(key in obj) {
if (obj.hasOwnProperty(key) ){
if(obj[key] instanceof Object)
__disableAllDebug(obj[key]);
else
obj[key] = false;
}
2017-12-31 18:26:59 +01:00
}
}
if(Debug.debug)
console.log("Guess we're debugging ultrawidify then. Debug.js must always load first, and others must follow.\nLoading: Debug.js");