Add debug and firebug javascript to all main templates
debug has flag to turn off all console.* methods firebug has override if console.* are missing
This commit is contained in:
16
www/layout/admin/default/javascript/firebug.js
Normal file
16
www/layout/admin/default/javascript/firebug.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/* vim: set fileencoding=utf-8 expandtab! shiftwidth=2 : */
|
||||
/* modified version of firebugx.js which can cope with
|
||||
* firebug 1.2+ and the webkit console */
|
||||
|
||||
var ConsoleSetup = function() {
|
||||
if (!window.console)
|
||||
window.console = {};
|
||||
|
||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
||||
|
||||
for (var i = 0; i < names.length; ++i) {
|
||||
if (!window.console[names[i]]) {
|
||||
window.console[names[i]] = function() {}
|
||||
}
|
||||
}
|
||||
}();
|
||||
Reference in New Issue
Block a user