mirror of
https://github.com/nuintun/command-manager.git
synced 2025-12-15 15:20:06 +08:00
update files
This commit is contained in:
17
static/js/terminal/lib/debug.js
Normal file
17
static/js/terminal/lib/debug.js
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (Terminal){
|
||||
Terminal.prototype.log = function (){
|
||||
if (!Terminal.debug) return;
|
||||
if (!window.console || !window.console.log) return;
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
window.console.log.apply(window.console, args);
|
||||
};
|
||||
|
||||
Terminal.prototype.error = function (){
|
||||
if (!Terminal.debug) return;
|
||||
if (!window.console || !window.console.error) return;
|
||||
var args = Array.prototype.slice.call(arguments);
|
||||
window.console.error.apply(window.console, args);
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user