Show HN: Bang Bookmarks – replicate DuckDuckGo bangs in Firefox using Keymarks
github.com
github.com
[1]: https://support.mozilla.org/en-US/kb/how-search-from-address...
Opera (pre-Chromium) had this feature to begin with, then Firefox (using bookmarks to store the keywords instead). Vivaldi browser retains the Opera style custom search UI and whenever I find myself searching a site enough I just create a nickname for it (eg: to archive the URL directly to archive.org/is, search caniuse.com, among dozens of others).
Too true. I've wondered for a while what the keyword field in a bookmark was for.
I also found out just the other day that I can add search engines to Firefox[1] if the site supports the OpenSearch API[2]. I didn't know they could be added this way, nor did I know about OpenSearch, if I hadn't have searched for an easier way to search a site I frequent then I would never have known.
[1] https://support.mozilla.org/en-US/kb/add-or-remove-search-en...
It's incredibly well hidden though, and the UX is horrific, which I'm convinced must be deliberate.
This feature has been implemented since I started using firefox, circa 2004.
For anyone else on Firefox, there's no need to go through a search engine or install anything. Just follow the instructions in that link. It'll change your life.
The only difference would be one extra space needed for invocation, i.e. instead of `!github test` you'd need to type `! github test`.
I tried this about ten years ago and it seemed to work.
From https://gist.github.com/myfonj/36a2a72a8ac6b6172ee32aae271e7... :
/*
howto:
# place this file somewhere on your disk
# open it in Firefox
# bookmark it, so it's address is like
# file:///c:/web-root/utils/firefox-shell.html
# edit new bookmark: append '?%s' to its URL, so it becomes
# file:///c:/web-root/utils/firefox-shell.html?%s
# set some handy Keyword, eg. '>', '#' or '!' for it
# try it. you should see a list of defined 'bookmarks' (testing only)
# extend, tweak.
# remember that you must use space after the main Keyword: "> command argument1 argument2"
*/ https://duckduckgo.com/?q=!%20site:developer.mozilla.org%20%sOne of the thing that I miss from Chrome from a while ago is the integration with Google. I remember that Chrome would show the query in the omnibar (on mobile anyway) when doing a search on Google. So if you needed to make changes to the query, you can continue doing so within the omnibar.
I think if we can get something like that Chrome feature in Firefox but for DDG (or maybe any search engine?), using Firefox's smart keywords feature would be a lot simpler, and you can bypass the extra request to DDG that it would otherwise take.
At least in Firefox you can also re-enable the search box and just use that. It's even accessible via it's own shortcut (ctrl+k).
Also, you can use just a `!` for Im Feeling Ducky, to visit the first result.
I personally use short keywords like "ccc Lego" to search CamelCamelCamel or "e Razer" to search eBay
One thing Firefox does make trickier is that it doesn't make clear you're searching your custom search engine. Chromium recognizes my "ccc", so once I hit space it replaces it with "Search CamelCamelCamel: Lego". Firefox just leaves the bar "ccc Lego", makes it tricky to know if it recognized it.
What's a little unclear about this feature is how you add new search engines to this list-- since there's more functionality here than old-style bookmark keywords, it's not just a matter of right-clicking in a search field or pasting in a URL with a placeholder in it. On supported sites, click the location bar-- at the bottom of the dropdown, you'll see a "This time, search with:" entry with icons for each of your installed search engines, and, if the site supports search, an additional icon with a green "+". Click that to add the search engine, then set your keyword of choice in Preferences.
That's true, and an extension helps actually making those behave like real search engines: https://addons.mozilla.org/en-GB/firefox/addon/add-custom-se...
open $(rg -o -e "\[(.?)\]\(http.?\)" <PATH_TO_NOTES_DIR> | fzf | rg -o "http[s]?://.[^\)]+")
Note:
This looks specifically for the [markdown link syntax](https://www.markdownguide.org/basic-syntax/#links). Lastly, it does require ripgrep and fzf to be installed.
And for those unaware, Konqueror used KHTML, which gave birth to WebKit, which Safari used, and then of course eventually Chrome used until forking it into Blink.
https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=%s&sort=byPopularity&type=story
And add whatever keyword you want.The magic is %s gets replaced with whatever string you add after the keyword.
If you add it as your default search provider you can use it directly from the address bar, and at that point it works very similarly to DDG bang syntax (although it does a few other things apart from bookmarks as well).