Using FireBug’s console logger with GreaseMonkey 0.6.4
FireBug is the best tool (a Firefox extension) for web development ever invented … well, at least one of the best.
The console method (formerly known as printfire) is a feature of FireBug that enables logging into firebug’s console with different levels. Thing is - it does not quite work with GreaseMonkey scripts. Until now!
The solution is very simple - using GM’s unsafeWindow object. This object is the same as the ‘window’ object that local javascript is seing, and it includes firebug console methods.
Like so:
unsafeWindow.console.info('some informational message');




No Comments Yet