ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Post New Requests Here

IDEA: rule-based browser chooser


I've been kicking around an idea for a rule-based browser chooser. The idea is, it becomes the default browser, and when it receives a link it launches the "real" browser you wish based on a set of rules which you define.

If it launched quick enough it wouldn't even have to stay resident - it could open, fire the link to the right browser, and then close.

Here's some thoughts:

should be able to define arbitrarily many commands and arguments (e.g. chrome, firefox, chrome privacy, chrome full-screen, etc.)
should work on arbitrarily many rules
should be able to prioritize rules
should be able to set itself up as the default browser even in windows 7
   corollary: should be able to unset itself too!

should be able to detect (and act on) which (if any) browser is already running
should be able to identify (and act on) what program called it
should be able to identify (and act on) the url or portion thereof

I think rules should be in a text format. For some reason I'm picturing something like a procmail recipe.
They'd probably be easier to use, though, if they were creatable in a outlook-like manner.

some example rules

--- ---
//three low-priority rules for default cases
//use the already-open browser if there is one
//(if I'm working in Chrome, use it!), preferring firefox, otherwise run firefox.
If firefox is running
open url in firefox
priority 100
if chrome is running
open url in chrome
priority 105
if no browser is running
open url in firefox
priority 110

//override default case for specific urls
if url contains "gmail"
open url in chrome
priority 1
if url contains "windowsupdate"
open url in IE
priority 1
if calling program equals feedreader
open url in firefox-new-window-in-background
priority 10
if calling program equals farr
open url in opera
priority 10

There's a similar program "BrowserChooser" that sets itself as default, which asks what you want to do every time you click a link.
All the other solutions I found on DC also seem to be based on letting you pick which browser when you click the link through various mechanisms. I bet a rule set could cover almost all cases without user interaction.
I actually use gnu/linux most of the time, and I bet this could be done with a simple bash or perl script, but I don't actually think I'd use it on linux - I use firefox for everything. I use single-purpose browsers more in Windows.
It would sure be nice if it could even intercept links clicked in a browser, but this would probably require an extension for each browser?

Does anyone else think this would be handy? Certainly not worth coding just because I want google voice to open in chrome.


i sort of did the 1st part here, you may try that if you want.

This is an idea i've been so tempted to work on.. though my main idea was regex matching on urls to decide which browser to open the url in.

The thing that has stopped me from implementing it is the "BrowserChooser" application, which is open source and seems to be a great foundation for adding such code.  So unless BrowserChooser is really flawed, i think the best way forward would be for someone to add these functions to that program.


[0] Message Index

Go to full version