8 ms·
The killer feature is that you can extend this with your own macros. E.g. if you want the address bar to recognize "hn " as a prefix keyword, and redirect "hn f
by perihelions 3y ago
The killer feature is that you can extend this with your own macros. E.g. if you want the address bar to recognize "hn " as a prefix keyword, and redirect "hn firefox address bar" to, say, Algolia — you simply create a bookmark with "Keyword": "hn" and "URL": "https://hn.algolia.com/?q=%s https://hn.algolia.com/?q=%s" (not actually a URL, don't click on it) – %s indicating where the macro parameter substitutes. Then "hn firefox address bar" macroexpands to
https://hn.algolia.com/?q=firefox%20address%20bar https://hn.algolia.com/?q=firefox%20address%20bar
- doe88 3y agohttps://support.mozilla.org/en-US/kb/how-search-from-address-bar https://support.mozilla.org/en-US/kb/how-search-from-address...
- rascul 3y agoI use this often. I just wish there was a way to escape the keyword. Like for example if I wanted to do a web search for "hn firefox address bar" I have to click the correct search engine with my mouse. Maybe there's a method I'm not aware of.
- notRobot 3y agoI think you can have the keywords begin with a # or a @ or a ! (a la DDG bangs).
- deleted 3y ago[deleted]
- usea 3y agoyou can make another keyword search for your search engine, and use that instead of a naked search. like: "g hn firefox address bar"
- velut 3y agoYou can press Ctrl+K or type a `?` before the search query and Firefox will use your default search engine without expanding the bookmark macro.
- rascul 3y agoI notice that ? is mentioned in the submitted article, but I didn't get what you said from it. Regardless, ? is apparently what I needed to solve my problem. Thanks!
- velut 3y agoThis is one of my favorite features that I use daily. I use the URL "https://www.google.com/search?q=site:ycombinator.com+%s https://www.google.com/search?q=site:ycombinator.com+%s" to search content from HN, and "https://www.google.com/search?q=site:reddit.com+%s https://www.google.com/search?q=site:reddit.com+%s" to search on Reddit. I also have "https://www.npmjs.com/package/%s https://www.npmjs.com/package/%s" to directly go to a package page on npm.
- deleted 3y ago[deleted]
- bmacho 3y agoMe too, on Microsoft Edge. Until one day an update nuked away all of my custom search keywords :( This is probably less of a problem on firefox, where they are regular bookmarks.
- ckosidows 3y agoSame happened to me recently. I lost my custom search keywords randomly one day
- bmacho 3y agoHappened after a windows update for me. I've tried to restore them, inspect the database where they should be, but they were already gone. Maybe if you have a system backup, you can find yours! I've found this random tutorial how to mass create Edge search engines by editing the Edge database https://jeffhandley.com/2022-10-17/custom-search-engines https://jeffhandley.com/2022-10-17/custom-search-engines if you want to store your search engines in a separate file in the future
- gnomespaceship 3y agoBtw if you also use DuckDuckGo, you can start your search with "!hn" and "!r" bangs: https://duckduckgo.com/bangs https://duckduckgo.com/bangs
- bmacho 3y agoI've wrote the same, with the same algolia example :D Do you remember if it was possible to edit or add custom search engines from GUI before? I remember having them, but I can't find it. Also it seems to me as a basic feature and not a "killer feature".
- bejd 3y agoRight-click on a search box > "Add a Keyword for this Search". Edit: it then gets saved as a bookmark and you can edit it like any other.
- bmacho 3y agoI don't have that. Where? Algolia and google search boxes(? the input fields?) don't show anything like that. edit: also if I modify a keyword for my opensearch/xml search engines in about:preferences#search , it won't show up as a regular bookmark. Also I can't even see the URL for those search engines.
- velut 3y agoRight click inside a search box. There should be the option "Add a Keyword for this search".
- johnnyworker 3y agoOr just right-click the input field, and if the browser recognizes it as a search field (they're good at it by default, but you can implement https://github.com/dewitt/opensearch https://github.com/dewitt/opensearch to make extra sure), you'll get an option to create a search from it, with a keyword of your choosing (haven't tried Safari).
- raybb 3y agoI implemented it for OpenLibrary (https://github.com/internetarchive/openlibrary/pull/5104 https://github.com/internetarchive/openlibrary/pull/5104) and it was surprisingly easy and works well!
- cubefox 3y agoAt least at some point in the past, this method had the advantage of working also with POST searches, while the manual insertion of %s works only with GET.
- kevincox 3y agoYup, I use this all the time. `d` is for searching my favourite D&D reference, `i` is for IMDB, `p` is for image search, `v` is for GIF search... It is also great for keyword-based bookmarklets.
- bmacho 3y agoSimilarly you can run javascript programs on a site with a parameter from the url bar, if you want. For example you can make a bookmark with the URL javascript: document.body.innerHTML = "%s" + document.body.innerHTML and add a keyword @addBefore and it will work. (Useless example, but it probably shows where and how the javascript runs.)
- bshacklett 3y agoNow that’s awesome. Bookmarklets have felt largely useless to me since I got rid of the bookmarks bar outside of new tabs. This might make them useful again.
- pjot 3y agoThis is a feature in Chrome as well! https://support.google.com/chrome/answer/95426 https://support.google.com/chrome/answer/95426
- atomlib 3y agoThis is Firefox's best kept secret. To this day I cannot fathom anyone willingly switching from Firefox to Chrome/Edge/any other Chromium-based browser. There are so many tiny features that are useful at least to myself, while a minor JavaScript performance advantage isn't something that important in the grand scale of things.
- baby 3y agoAnd then there’s tree style tabs. But actually I moved to Chrome due to how many issues I ran into with tree style tabs due to firefox not letting do its thing
- kenmacd 3y agoWell, in case you decide to move back, give Sidebery a try. I switched a while back haven't had any issues.
- Zecc 3y agoI second this. I've had the very rare message saying the tab tree has gotten out of sync (always as a consequence of me moving tabs between incognito windows), but the first time it happened clicking the message refreshed the tab tree successfully; the second time it didn't but toggling the sidebar off and on fixed it. I've had no problems with stability. And to me the context menu option to unload tabs is a killer feature.
- eitland 3y agoSo, if I understood you correct, you had issues with TST and instead of disabling TST, you went for Chrome?
- fn-mote 3y agoThey want a good tab manager... so they changed because the one they tried for Firefox did not work.
- a_c 3y agoI have been using duckduckgo's bang feature for searching a particular site. e.g. !hn to search on here, !w on wiki and !g back to google is the result from ddg looks off.
- naturalpb 3y agoI love DDG's bangs. If I want to see Google results, I use !s for Startpage instead. It's Google results through Startpage's search proxy.
- yannyu 3y agoIt's funny that this used to be a killer feature in Opera before they fell off. Between that and mouse gestures, they were really ahead of their time.
- ugh123 3y agoThis is also available in Chrome!
- dugmartin 3y agoThis used to be baked into Chrome too but they removed it. I'm guessing to juice the Google search metrics. https://twitter.com/googlechrome/status/1504858912692084745 https://twitter.com/googlechrome/status/1504858912692084745
- Ajedi32 3y agoThe Tweet says it's still there, just slightly more buried than it used to be. Which is a shame since it's one of the most useful features in Chrome and not a lot of people know about it. Still way less confusing than Firefox's UI for this though. What I like most about Chrome's implementation is how by default the search engine is linked to the main site, so I can type "yo<enter>" to visit the YouTube homepage or "yo<tab>" to search YouTube. And there's no need to manually set anything up (except to click the "activate" button now next to each site you want to the feature on, unfortunately).
- gregsadetsky 3y agoThe same is available in Chrome. I made a list of shortcuts I use here [0] -- copying a few favorites below: shortcut: "aw", lets you type: "aw s3", "aw iam", etc. https://console.aws.amazon.com/%s shortcut: "amzn", searches the retail side https://www.amazon.com/s/?field-keywords=%s shortcut: "gm", searches through gmail (change the 0 if you use multiple accounts) https://mail.google.com/mail/u/0/#search/%s shortcut: "maps", searches google maps https://www.google.com/maps/search/%s/ shortcut: "img", searches google images https://www.google.com/search?tbm=isch&q=%s shortcut: "wp", goes directly to the article if it exists https://en.wikipedia.org/wiki/%s shortcut: "yt", searches youtube https://www.youtube.com/results?search_query=%s [0] https://github.com/gregsadetsky/custom-search-engines https://github.com/gregsadetsky/custom-search-engines
- cpleppert 3y agoYou can also use a duckduckgo query like ! site:site.com query. That is more reliable when using something like wikipedia when you aren't sure of the exact title and don't have to type it all out.
- Zecc 3y agoOf course for Wikipedia specifically you'd use `!wiki query` instead.
- robbyking 3y agoAnd IIRC, Chrome copied this from Opera. It's a shame Opera never found its audience (or more specifically, a revenue stream), they pioneered a lot of browser features that we consider to be standard these days, like tabs and support for extensions.
- kbenson 3y agoIt's been around in some form in most major browsers for decades. I remember Creating custom search entries in Firefox (or was it Phoenix still at that point?) in the early 2000's.
- 3y ago
- FalconSensei 3y agothis is just the search engines feature on chrome...
- girishso 3y agoI don't see any "Keyword" field when creating bookmark, only "Tags".
- vanderZwan 3y agoIf you mean from clicking on the star in the address bar, that is correct. However, if you edit the bookmark afterwards from the bookmarks sidebar, or add a bookmark on the "Manage bookmarks" tab (CTRL+SHIFT+O), you do see it.
- girishso 3y agoYes, that did help, Thanks!
- brianpan 3y agoIt's kind of weird that these turn into bookmarks and are mixed in with your bookmarks. I think what people are talking about in this thread are "Search Shortcuts". And I don't know why this is a "best kept secret"; it's right in the Search section of your FF settings. If you want to create one "one the fly", don't create a bookmark, but instead right-click in a search field and choose "Add a keyword for this search..." You can try it using the search at the bottom of this page.
- mcpackieh 3y agoThe easiest way is to right-click on a search field and select "Add a Keyword for this Search"
- jimmaswell 3y agoMobile used to have this too until they ruined it. And now they won't add it back with no valid justification.
- behnamoh 3y agoI've been doing this on Brave for years. https://itsbehnam.com/Brave-Hacks-I-Create-my-Own-Custom-Search-Engines-to-Save-Time-abc7297ce6ea4cb2b3c99b2182f59714 https://itsbehnam.com/Brave-Hacks-I-Create-my-Own-Custom-Sea...
- ris58h 3y agoUse it daily for GitHub code search (gh - https://github.com/search?type=code&q=%s https://github.com/search?type=code&q=%s).
- unsungNovelty 3y agoThere is Duckduckgo Bangs - https://duckduckgo.com/bangs https://duckduckgo.com/bangs. They directly searches inside a website. There are a total of 13,563 bangs of websites. Twitter, Amazon, Stackoverflow, wikipedia, arch linux. You have to set your search engine to DDG though. Wanna check if Thunderbird v115 is in arch repos? Ctrl + L, !archpkg thunderbird Boom! My favourites: !w <term> searches <term> inside Wikipedia !so <term> searches for that term inside stackoverflow !a <term> searches inside amazon.com !ai <term> searches inside amazon.in !arch <term> searches inside arch wiki article for that term !archpkg <term> directly searches for archlinux.org/packages Also, I just learned that there is a "!hackernews"
- jcul 3y agoAnd they are also supported by kagi. It's nice that kagi lets you define your own, so I can have custom ones across browsers / mobile / desktop... So long as I'm logged in and have configured kagi to be my default search engine (my phone defaults to ddg and sometimes I might use a browser in a VM or something).
- Antipode 3y ago!hn is also for hacker news
- mcpackieh 3y agoWith these search keywords, I've cut down on my general purpose search engine use dramatically, maybe 90%. Most of my searches through ddg/google used to be searches I intended to land on a known website with, so with search keywords for the search functionality on wikipedia, documentation websites, etc, I have been able to cut out the middleman. Also, people slag on wikipedia's search functionality a lot, but I've found it to actually be pretty good even with imprecise searches. For instance, I forgot the name of Lubyanka, but searching for "KGB prison" found it: https://en.wikipedia.org/w/index.php?search=kgb%20prison https://en.wikipedia.org/w/index.php?search=kgb%20prison
- bombolo 3y agoThis has been available on kde for several years.
- asadotzler 3y agoI wrote all about this kind of thing back in 2001 or so https://www-archive.mozilla.org/docs/end-user/keywords.html https://www-archive.mozilla.org/docs/end-user/keywords.html
- viewtransform 3y agoOften times during a Teams meeting someone would wonder who had filed this ticket and I would "Control-L p Jose Smith" to instantly bring up the org chart for Jose Smith. People were amazed. The Control-L/Command-L(mac) to focus the url bar. p is the keyword set to search the internal company org chart. Another useful Firefox feature is to right click, Take Screenshot, and save the full web page rendered as you see it as an image. This is useful for those internal webpages with tables and fancy javascript rendered widgets that never properly render to pdf when saving the page.
- yasenn 3y agoIs there some mobile browser with the same macro feature for address bar? https://hn.algolia.com/?q=firefox%20address%20bar https://hn.algolia.com/?q=firefox%20address%20bar
- 1vuio0pswjnm7 3y agoThis is a very old feature that (IIRC) all browsers copied that dates back to at least Microsoft Internet Explorer. I also recall people marketed it as a gimmick and came up with some silly names for it, e.g., "shortcuts". (I will try to find the originating browser and date it was introduced unless someone here beats me to it.) Even today, Chrome presumptuously calls this macro expansion "site search". I use it to access static pages. For example, I have local httpd's serving local pages on localhost addresses. One is a "clipboard" that I use in Chromebook "Guest" mode to output text from Chrome to a file descriptor, e.g., stdout or a file under /usr/local. This enables me to use UNIX utilities to process text from Chrome. (Chromebooks attempt to limit Chrome user access to the filesystem to a folder that the user can only access by using Chrome.) For example, given the macro "https://127.0.0.8/%s.html https://127.0.0.8/%s.html", when I type "clip" in the address bar, the browser navigates to a local page https://127.0.0.8/clip.html This page is an HTML form with a textarea where I can paste text that I want to output to a file descriptor, e.g., stdout or a file under /usr/local. Another example is a static page that is a list of web search results from various search engines. These results pages are generated by a command line web search system I created using only standard UNIX utilities. A final example is that I use "site search" to quickly navigate to chrome://settings pages with a single key, e.g., chrome://settings/clearBrowserData, chrome://settings/siteData, chrome://settings/content/all, or chrome://settings/searchEngines. 1. I find this label comical as I'm not a "developer". I'm just a computer user trying to work around problems caused by ad-supported "tech" companies in the comparitively rare instances I have to use one of their hopelessly complex graphical web browsers.
- conaclos 3y agoI really like keywords. I use keywords for search engines and bookmarks. I created several ones to mirror DuckDuckGo bangs. It is unfortunate that add-ons cannot add a set of keywords: it would be great to have all DuckDuckGo bangs defined as keywords by an add-on.
- Max_Mustermann 3y agoThis was sadly deprecated on Android: https://github.com/mozilla-mobile/fenix/issues/12099 https://github.com/mozilla-mobile/fenix/issues/12099 It was such a huge loss for me that for at least a year I used the outdated pre-Fenix. Now they still work on Desktop but they just stopped working on Android (althouth the bookmarks itself are synced-up)
- TRiG_Ireland 3y agoYup. I use d to search Onelook Dictionary.
- conor- 3y agoDDG bangs[0] does this too but without the need to set up your own custom macros. [0] https://duckduckgo.com/bangs https://duckduckgo.com/bangs