A keyboard shortcut to add a site to "unsorted bookmarks"?

User Help for Mozilla Firefox
Post Reply
sojusnik
Posts: 23
Joined: April 14th, 2011, 2:07 am

A keyboard shortcut to add a site to "unsorted bookmarks"?

Post by sojusnik »

Hi folks!

I'm searching for a user friendly way, an addon or an about:config tweak, to bookmark a site to "unsorted bookmarks". Actually I want to replicate the same behaviour, when clicking once on the star in the url, but only with a keyboard shortcut like Strg+Shift+D.

Any help is appreciated!
morat
Posts: 6437
Joined: February 3rd, 2009, 6:29 pm

Re: A keyboard shortcut to add a site to "unsorted bookmarks

Post by morat »

You can simulate clicking the star button with the keyconfig extension.

Code: Select all

document.getElementById("star-button").click();

viewtopic.php?f=48&t=72994
sojusnik
Posts: 23
Joined: April 14th, 2011, 2:07 am

Re: A keyboard shortcut to add a site to "unsorted bookmarks

Post by sojusnik »

Superb! Works like a charm. Thank you!
Zoolcar9
Posts: 2225
Joined: November 9th, 2004, 6:45 pm
Location: Jakarta, Indonesia (UTC+7)
Contact:

Re: A keyboard shortcut to add a site to "unsorted bookmarks

Post by Zoolcar9 »

morat wrote:

Code: Select all

document.getElementById("star-button").click();

or

Code: Select all

PlacesCommandHook.bookmarkCurrentPage(); 

or (to toggle)

Code: Select all

if (BookmarkingUI.status === 0) // if not bookmarked
  PlacesCommandHook.bookmarkCurrentPage(); // bookmark it
else
  PlacesUtils.bookmarks.removeItem(BookmarkingUI._itemIds[0]); // remove  
My Firefox information | Add-ons | GitHub

"With great power, comes great desire to show it off."
sojusnik
Posts: 23
Joined: April 14th, 2011, 2:07 am

Re: A keyboard shortcut to add a site to "unsorted bookmarks

Post by sojusnik »

Zoolcar9, thanks!
Post Reply