6

I have recently migrated to Firefox 4 away from Chrome (Chrome's text highlighting is too annoying as I highlight while I read). One of the things I loved about Chrome was the fact that the address bar would do a google search unless it was a URL. As such, I am in the habit of typing into the address bar "define: menagerie".

Unfortunately, Firefox then gives the error Firefox doesn't know how to open this address, because the protocol (define) isn't associated with any program.

Is there a way to modify Firefox's default address bar behaviour such that it handles this in a more Chrome-esque way? That is, I would like it to perform a search whenever it doesn't recognise the protocol.

4 Answers 4

5

A half-solution is to install a protocol handler for define: specifically.

  1. Open Google.

  2. Paste to address bar:

    javascript:window.navigator.registerProtocolHandler("define", "http://www.google.com/search?q=%s", "Google definitions");
    

    (Make sure to change the second parameter to match the google.* domain you are using.)

1
  • 3
    Nice! I should also note that just omitting the colon (which triggers Firefox to think that "define" is a protocol) works, too. So "define menagerie" and "define: menagerie" yield the same results. Jun 2, 2011 at 13:40
7

Why it doesn't work

This just doesn't work with define: xyz or other Google keywords witha colon afterwards, because they are probably interpreted as protocol delimiters (http:, ftp:, ...).

All other searches should work normal. If you type "menagerie" into the URL bar, it does a Google search for it.

By the way: You can also go to about:config and, for example, change the preference keyword.URL to something like http://search.yahoo.com/search?p=, then whenever you enter not an URL, it searches Yahoo for it.

"Workarounds"

But I assume you know that you're going to search for something before you go to the address bar: If you used keyboard shortcuts you'd have pressed Ctrl+L to go to the URL bar, then you might just press Ctrl+K to get to the search bar instead. If you then type in "define: menagerie" it takes you to the definition page as expected.

5
  • 1
    Informative answer. Thanks for the keyboard shortcuts, I didn't know about those ones. I've been pressing Shift+F6 to get to the address bar (which highlights the current tab in FF4), so this will be a handy one.
    – user77064
    May 5, 2011 at 9:03
  • 1
    Thanks for the keyboard shortcuts. I was using Alt + D to shift focus to address bar.
    – Mudassir
    May 5, 2011 at 9:16
  • @Bringer128 @Mudassir That's interesting, I'm not a Firefox user but I didn't know that so many alternatives to Ctrl+L existed!
    – slhck
    May 5, 2011 at 9:18
  • The Firefox keyboard controls are listed here : support.mozilla.com/en-US/kb/Keyboard%20shortcuts
    – BrianA
    May 5, 2011 at 10:56
  • 1
    Also neat: if you remove your search bar and press Ctrl+K, it opens the default search engine Jul 18, 2013 at 6:54
0

I use quick search bookmarks http://www.sugarrae.com/seo-sphere/creating-firefox-quick-search-bookmarks/

This way I go to address bar give g (keyword I have given for google quick search) then whatever I would want to search for.

and default address bar search engine can be changed http://4paisa.blogspot.com/2008/02/firefox-search-from-address-bar.html

0

I, too, have removed the search form from the Firefox 4 interface, as I also did with Firefox 3. However, I use a different method for selecting which search engine to use:

  1. Install the ‘Add to Search Bar’ extension [https://addons.mozilla.org/en-US/firefox/addon/add-to-search-bar/].
  2. Go to any search engine page, or any website that has a search form.
  3. Right click inside the search text box and choose ‘Add to Search Bar…’
  4. The ‘Add Engine to Search Bar’ dialog box will appear. In the ‘Keyword’ entry box, add a meaningful keyword for the search engine/web page – for example, g = Google; gi = Google image; b = Bing, etc. – and click OK.
  5. In future, if you wanted to search Google Image for example, left click in the address bar, type in [gi] [space] [search parameter] – without the square brackets, of course – , and the Google Image page will open showing the results of your search parameter.

I have about 15 of these aliases set up. They make surfing/searching so much easier for me.

You must log in to answer this question.