If you’ve left console.log statements in your code intentionally or by mistake, the following will allow a successful noop in browsers for which Firebug is either not installed, disabled, or uninstallable.
liaison.util.firebug = function() { (function() { if(!window.console) { console = {}; console.log = Ext.emptyFn; } })(); };
One Comment
This is really useful stuff - I’m always forgetting to remove console.log lines. It might be better to just define an empty function instead of using Ext.emptyFn as then you can use this anywhere…
Nice to see another Ext blog - keep it up!