firebugx was breaking things
authorDan Fuhry <dan@enanocms.org>
Sat, 15 Sep 2012 13:16:13 -0400
changeset 1362 c690f0b39bcb
parent 1359 53c7e3cc7fb5
child 1363 f1ed3e9298ae
firebugx was breaking things
includes/clientside/static/enano-lib-basic.js
--- a/includes/clientside/static/enano-lib-basic.js	Mon Jan 16 09:23:20 2012 -0500
+++ b/includes/clientside/static/enano-lib-basic.js	Sat Sep 15 13:16:13 2012 -0400
@@ -22,15 +22,13 @@
 
 // placeholder for window.console - used if firebug isn't present
 // http://getfirebug.com/firebug/firebugx.js
-if (!window.console || !console.firebug)
-{
-		var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
-		"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
+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 || (window.console = {});
+for (var i = 0; i < names.length; ++i)
+	if ( typeof(window.console[names[i]]) != 'function' )
+		window.console[names[i]] = function() {}
 
 console.info('Enano::JS runtime: starting system init');