Often during development you use firebug to figure things out. You might have wanted to test your code in another browser and you discover a bug! But it isn’t, it’s just because you forgot to take out that firebug debug line. You know all about these types of errors caused by console.log.
console.log(window);
The line above could cause the error message below
Line: 13
Character: 5
Code: 0
Error Message: Expected identifier, string or number
The error above is from IE Debug Bar, which is generally better than IE’s normal debugging window. In anycase, it gets annoying to be forced to removed the firebug lines of debugging code. I offer a solution from the firebug team to kill them in other browsers!
noconsole.js is a little javascript file I threw together to help out. I was looking for a good way to get those errors to go away and I’ve seen it done elsewhere, like CNet. The script is inside of an anonymous function as well, as I don’t like messing with global variables.
Anyway, here are the files, one uncompressed and one compressed although the differences are negligible anyway.
Have a good time debugging Internet Explorer everyone! (Just kidding.)