summaryrefslogtreecommitdiffstats
path: root/lib/firebugx.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/firebugx.js')
-rw-r--r--lib/firebugx.js15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/firebugx.js b/lib/firebugx.js
index 5a467fc..a0848e1 100644
--- a/lib/firebugx.js
+++ b/lib/firebugx.js
@@ -1,10 +1,9 @@
+if (typeof console === "undefined" || typeof console.log === "undefined") {
+ var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
+ "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
-if (!("console" in window) || !("firebug" in console))
-{
- var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
- "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
-
- window.console = {};
- for (var i = 0; i < names.length; ++i)
- window.console[names[i]] = function() {}
+ window.console = {};
+ for (var i = 0; i < names.length; ++i) {
+ window.console[names[i]] = function() {}
+ }
} \ No newline at end of file