Question

How can I automatically enable Firebug and FirePHP only for pages in selected TLD eg. *.dev?
I don't see any option for this. Maybe some userscript?

Also, is there any way to always start Firebug in minimized to status bar mode?

Was it helpful?

Solution

The best way to do this is as follows (not tested):

$firephp = FirePHP::getInstance(true);
// always disable first
$firephp->setEnabled(false);
if(substr($_SERVER['HTTP_HOST'], -4, 4)==".dev") {
    // only enable when criteria matches
    $firephp->setEnabled(true);
}

This assumes FirePHP < 1.0. If using FirePHP 1.0 it is even easier. You can install FirePHP into the site and it will only be enabled if the INSIGHT_CONFIG_PATH is set and an authorized client is detected.

I am not 100% sure what you mean about starting Firebug in minimized mode. It keeps the setting from when you last used it. If you want to explore some options we could implement to control Firebug, please get in touch.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top