用于调试的脚本库
As of
This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/34143/223801/debug.js
// ==UserScript==
// @name debug
// @namespace https://github.com/yeomanye
// @version 0.4
// @include *://*
// @description 用于调试的脚本库
// @author Ming Ye
// ==/UserScript==
// 开启调试
var debugMode = true;
var consoleFactory = function(prefix, type,suffix) {
prefix = prefix || "";
type = type || "log";
suffix = suffix || "";
return function(msg){
if (window.debugMode) {
console[type](prefix, msg,suffix);
}
};
};