2

Possible Duplicate:
how to add firefox bookmark as toolbar button

I'm trying to find a way to add a single bookmarklet to the navigation bar in Firefox 7 - any method (add-on, hack, Greasemonkey script) is fine by me, but haven't been able to find anything that works so far.

Because I only have one bookmarklet that I need, I really don't want to have the bookmark toolbar enabled and take up all that screen real estate - hence, I'm wondering if there's a way to create an extra icon on the navigation bar (alongside the Search Bar and Home, Bookmarks, New Tab, etc buttons) that contains the bookmarklet.

2 Answers2

2

You can perhaps use Custom Buttons.

I don't know how it handles complicated scripts, but I'm using it successfully to do some trivial tasks, e.g.

  • a button which opens Google in new tab (instead of current):

    gBrowser.selectedTab = gBrowser.addTab("http://www.google.com/");

  • a button which performs site: Google search over current URL:

    content.location = 'http://www.google.com/search?q=site:' + content.location.hostname;

  • Same button, but with prompt:

    var q=prompt("Search terms:").replace(/\s\+/g,"%252B");
    var loc="http://www.google.com/search?q="+q
    loc += "+site:"+content.location.hostname;
    content.location = loc;
    

To create nice image buttons, you can use Notepad++ to base64-encode the icon or PNG image:

data:image/x-icon;base64,[data here]
data:image/png;base64,[data here]
dgo.a
  • 891
jakub.g
  • 4,904
0

You can add a button that opens your bookmarks in a sidebar. Thats the only solution I can come up with.

View -> Toolbars -> Customize... -> Display your bookmarks 

There's also a keyboard shortcut for it (Command+B on Mac || CTRL + B on Windows)

That's all I can come up with, maybe it's already what you need.

Anonymous
  • 279