/ Published in: JavaScript

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.
To stop this happening use the below script from firebugx.js on the firebug lite homepage.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
(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(){}; } } })();
URL: http://getfirebug.com/lite.html
Comments
