Greasy Fork is available in English.

Debugger

A helper class for debugging

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.greasyfork.org/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
}