A helper class for debugging
Mint
Ezt a szkriptet nem ajánlott közvetlenül telepíteni. Ez egy könyvtár más szkriptek számára, amik tartalmazzák a // @require https://update.greatest.deepsurf.us/scripts/33864/222487/Debugger.js hivatkozást.
function Debugger(name, enabled) {
this.debug = {}
if (!window.console) {
return function () {
}
}
for (let m in console) {
if (typeof console[m] === 'function') {
if (enabled) {
this.debug[m] = console[m].bind(window.console + ': ' + name + ': ')
} else {
this.debug[m] = function () {
}
}
}
}
return this.debug
}