Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create Safari-like Bookmark Toolbar shortcuts in Firefox Web Browsers
There are a few things in Firefox that just do not satisfy my needs, and they're the reason I have not made Firefox my default browser. One of those issues is the handling of the Bookmarks Toolbar. In Firefox, unlike Safari (Command-1, -2, etc.), there aren't any hot keys assigned to the Bookmarks toolbar. While this has generally not been a problem, I still find myself wishing I could use my bookmarklets with the ease I have found in Safari.

The following is a guide, through the use of an external add-on, to add Safari's functionality within Firefox 3. Theoretically, these steps should be reproducible on Windows, Linux, and Mac systems. However, I have only tested it on my Mac, and the location of the .js file that needs to be edited will most likely vary.

Here's how I did this...
  1. Download and install Keyconfig.xpi. This plug-in is beyond awesome. It lets you change, modify, and add hot keys within Firefox. By default, the dialog with which to do so is hidden, so we'll have to bring that up to see all the hotkeys.
  2. Quit firefox. Create a new Firefox profile. Assuming you have Firefox installed in Applications, you'd do that with this command in Terminal: /Applications/Firefox.app/Contents/MacOS/firefox -ProfileManager. This step is crucial. I would never recommend working on your existing profile before trying out the edit on a clean profile. This is to make sure that you don't inadvertantly mess something up. Name it something that is different from your main profile, so it's easier to distinguish. (While you're in the Profile Manager, uncheck the Don't ask at startup box to make the Profile Manager appear when you launch Firefox.)
  3. Find the location of the prefs.js file for the profile you just created. On the Mac, it's located in your user's Libaray » Application Support » Firefox » Profiles » random_chars.newprofile folder. Normally this file should not be edited. Make sure that Firefox is closed while this file is being edited. Open the file in a text editor; BBedit is a good one on the Mac side.
  4. Paste the following line into the prefs.js file:
    user_pref("keyconfig.main.xxx_key__Keyword 1", "!][][][if(window.loadURI) loadURI(getShortcutOrURI('BOOKMARKLET_KEYWORD',{}));");
    What this does is create a preference in Firefox's About:config page. keyconfig.main.xxx_key__Keyword 1: This bit creates the preference for the add-on Keyconfig, naming it Keyword 1. If you'd like it to be called something else, you can modify everything after key__.

    The second part of this preference is the functional part that calls the bookmark for which you have set a keyword in your bookmarks: getShortcutOrURI('BOOKMARKLET_KEYWORD',{}));");. As you guessed, you edit the BOOKMARKLET_KEYWORD to whatever keyword you want. This is the same keyword that you will add to the actual bookmark in Firefox.
  5. Save and close the prefs.js file, then launch Firefox and select the profile you made earlier.
  6. Select Bookmarks » Organize Bookmarks, and go to the Bookmarks Toolbar location, then click on More. In the Keyword box, add the keyword you added in the prefs.js file earlier to one of your bookmarks.
  7. Type Shift-Command-F12 to bring up the Keyconfig keybinding dialog. This is where you'll set the keybinding you wish to use. I recommend using the same as Safari, but you may want to choose your own. Safari uses Command-1, -2 etc. In Firefox, Command-1 is set to bring up tabs. So in order to use this, we'll need to disable the current bindings so they won't conflict.
  8. In the Keyconfig dialog, select the KeySelectTab_1 binding and click Disable. Repeat this for all the Tab preferences.
Finally, close and reopen Firefox, and you should be ready to go.

[robg adds: I haven't tested this one. I added the instructions for accessing the Profile Manager; if there's an easier way to get there, please note it in the comments.]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)
 
[18,001 views]  

Create Safari-like Bookmark Toolbar shortcuts in Firefox | 3 comments | Create New Account
Click here to return to the 'Create Safari-like Bookmark Toolbar shortcuts in Firefox' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create Safari-like Bookmark Toolbar shortcuts in Firefox
Authored by: matters on Mar 05, '09 08:05:29AM

Use Quicksilver and then you won't care. :)



[ Reply to This | # ]
Create Safari-like Bookmark Toolbar shortcuts in Firefox
Authored by: Dr. T on Mar 05, '09 09:32:44AM

This above process is complex and requires you to create a new Firefox profile. If you have QuicKeys, you can easily assign a keystroke shortcut to each item of the Bookmarks Toolbar. If you want a bookmarked web page to open in a new tab, remember to use command-click in your QuicKeys shortcuts.



[ Reply to This | # ]
Create Safari-like Bookmark Toolbar shortcuts in Firefox
Authored by: dogen on Mar 14, '09 01:10:36PM

Simple workaround for Firefox 3.0.7 (and possibly others):

1. Under Bookmarks, choose Organize Bookmarks.
2. Select the Bookmarks Toolbar, then select a bookmark living there.
3. Click More on the lower pane so that you can see the Keyword field.
4. Type in a shortcut for the link. E.g., if you use Cmd-1 in Safari for Google News, type the number 1 into the field.
5. Type Cmd-l (that's an L) to highlight the location (address) field, then type 1 and press Enter. You'll go to Google News.

It's slightly more cumbersome than Safari's method—three keystrokes instead of one—but none of it requires a mouse, it's nearly as fast, and the number of shortcut keywords is seemingly unlimited. No third-party apps or extra profiles required.



[ Reply to This | # ]