What\'s a surefire way of detecting whether a user has Firebug enabled?
Keep in mind in Chrome window.console also returns true or [Object console]
.
Furthermore, I would check whether Firebug is installed with
if (window.console.firebug !== undefined) // firebug is installed
Below is what I get in Safari and Chrome, no firebug installed.
if (window.console.firebug) // true
if (window.console.firebug == null) // true
if (window.console.firebug === null) // false
The Is-True and Is-Not Operators obviously do type coercion, which should be avoided in JavaScript.