2 of 3 added 423 characters in body; added 1 characters in body

Firefox : 2 different URLs for bookmarks : keyword (for as search engine) and base

With a bookmark of IMDb "http://www.imdb.com/find?q=%s" and a keyword "imdb", I can type "imdb seven" then enter, and it will send me at "http://www.imdb.com/find?q=seven".

But how – with the same bookmark or another one – can I make "imdb" then enter go to "http://www.imdb.com/", and not "http://www.imdb.com/find?q=" ?


---EDIT Thanks to iglvzx, here's a JavaScript solution (original script by iglvzx, modified to load the main URL if the bookmark is selected in Firefox's menus). "m" is main URL, "s" is search. See his answer for more infos.

javascript:(function(){var q='%s',m='http://www.google.com/',s='http://www.google.com/search?q='+q;if(keywords==''||keywords=='%'+'s'){window.location=m;}else{window.location=s;}})();