Hacker News new | ask | show | jobs
by chrismorgan 2910 days ago
Firefox also has the little-known keyword functionality. Bookmark https://bugs.example.com/issue/%s, in the bookmark manager give it the keyword `bug`, and then typing “bug PROJ-123456” will take you to https://bugs.example.com/issue/PROJ-123456. (On some search fields there may be an “Add a Keyword for this Search…” item which helps with creating the bookmark with keyword, too.)

A quick look around https://developer.mozilla.org/en-US/Add-ons/WebExtensions/AP... suggests that it’s not possible to control the keywords and tags from an extension in Firefox; this is a sad omission: I’d really like an extension which imported all of DuckDuckGo’s !bangs as bookmarks with keywords, so that you could type in exactly the same stuff and have it bypass duckduckgo.com.

https://bugzilla.mozilla.org/show_bug.cgi?id=1276817 is about adding that, but weird stuff is happening there. I’m going to follow it up, because I’d hate to see this functionality lost. I use it for a number of things.

3 comments

Adding a keyword used to be more prominent and easy to do - you could right click any search bar and "Add as Keyword" - or you could edit the Bookmark link manually when bookmarking a page. They "simplified" bookmarking to where I need to navigate through several layers of menus to access the Bookmark Manager where I can finally edit the bookmark to add a Keyword and update the link to what it needs to be.

I have no idea why they made bookmarks so much more difficult to work with and I'm not sure when it happened - as I updated from FF39 to FF60. Using Quantum for the last few weeks - I'm pretty sure I'll be going back to FF39 as it's simply more usable. Especially since add-ons that were a large part of my workflow actually work (or even exist at all...)

“Add a Keyword for this Search…” is still there in the context menu.
Checked on my work computer and you're right! Something must be going on with my userChrome.css back at home that's inadvertently hiding it from me, since I hide useless context menu options like "Set as Desktop Background...", "Email Image", etc. Something I'm hiding must be hiding "Add as a Keyword for this Search..." on accident.
And debugging those things can be nasty!

I wish :contains() had stayed in CSS Selectors Level 3, or that you could use XPath in stylesheets.

Hmm… #contentAreaContextMenu actually looks pretty sane. They all have IDs, which I really should have expected anyway. I’m going to add some rules to my own userChrome.css. Thanks for the idea!

Search engines can also have keywords (see about:preferences#search), but since extensions can’t programmatically create search engines this is not a great deal of help.
I'd like to import DDG bangs into Firefox too, as the 3 redirects DDG does every time are painfully slow. I already have a scripts that imports them directly into the FF bookmark database, but I haven't had the time to figure out how to get a list of DDG bangs. If/when I do, expect a Show HN.
I found a list of bangs with URLs: see https://www.reddit.com/r/duckduckgo/comments/8w8vk5/a_list_o...

Please do go ahead and make this. It’ll save me the trouble of doing it! I was figuring on just generating a NETSCAPE-Bookmark-file from the JSON and importing it manually.