Return to Snippet

Revision: 5604
at March 10, 2010 03:42 by 1man


Updated Code
(function(){
	if (!window.console || !console.firebug) {
		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(){};
		}
	}
})();

Revision: 5603
at March 18, 2008 19:54 by 1man


Initial Code
if (!window.console || !console.firebug){
    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() {}
}

Initial URL
http://getfirebug.com/lite.html

Initial Description
Sometimes i forget to remove firebug console commands when debuging, which makes IE and some other browsers fail / cry.

To stop this happening use the below script from firebugx.js on the firebug lite homepage.

Initial Title
Stop Firebug Console Command Errors

Initial Tags
command

Initial Language
JavaScript