Greasy Fork

Greasy Fork is available in English.

Console Tools

A library for shortened console.log, console.info, console.error

当前为 2016-05-26 提交的版本,查看 最新版本

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/19894/127768/Console%20Tools.js

// ==UserScript==
// @name         Console Tools
// @namespace    PXgamer
// @version      0.2
// @description  A library for shortened console.log, console.info, console.error
// @author       PXgamer
// @grant        none
// ==/UserScript==

function cl(variable) {
    'use strict';

    console.log(variable);
}
function ci(variable) {
    'use strict';

    console.info(variable);
}
function ce(variable) {
    'use strict';

    console.error(variable);
}
function cw(variable) {
    'use strict';

    console.warn(variable);
}
function ct(variable) {
    'use strict';

    console.trace(variable);
}
function cc() {
    'use strict';

    console.clear();
}