Due to problems with Delicious extension I recently migrated to Pinboard. The app (used via bookmarklets) is fairly nice, but I really missed ability to bookmark via Ctrl-D keyboard shortcut.
It turns out, there is a way.
So I added new key for Pinboard bookmark.
The code I used is very similar to bookmarklet code, although it
needed some twist: the code runs in extension context and
chrome://browser/content/browser.xul, not quite a
thing I want to bookmark. Replacing it with
content.document.location does the trick. Similarly
content.getSelection() must be used to extract the selected text.
Here is the complete code (to be pasted in keyconfig code editor):
After saving it, I mapped
Ctrl-D as shortcut for the newly defined action
(just clicked the field left to Apply button and pressed
That's all. Since then pressing Ctrl-D brings pinboard bookmarking window.