Hacker News
points by damiante 1 day ago | 0 comments
Do you really need a server implementation for this? Surely you could achieve this with a browser extension that grabs queries which begin with "!" and then has a mapping table of postfixes to query formats?
[–] npmania 1 day ago
I'm the author of this project, and I've actually been using it myself since I started it in 2022. The main reason was that DDG wasn't managing their list at all at the time, and another need was mobile web browsers, where extensions are not really as approachable as on PC. Also, the default "." is way easier to locate than "!" on mobile keyboards, and the prefix is configurable.
[–] Leftium 13 hours ago
Kagi maintains an updated set of open bangs at https://github.com/kagisearch/bangs

I made `!` easier to type on mobile via double-space (double-tap SPACE to insert `!` similar to how macOS/iOS adds a period with double-space): https://whiz.leftium.com

Still a work in progress; I need to make the UI more intuitive: https://github.com/Leftium/whiz/

[–] Leftium 13 hours ago
You can actually do better than a browser extension via service workers: after the first download, it runs from the server.

You can even configure this as your default search engine so searches from the omnibar work: https://whiz.leftium.com/go

Source code: https://github.com/Leftium/whiz/blob/main/src/service-worker...

[–] ginko 1 day ago
Browsers already support programmable search keywords. (Firefox does at least) I‘m using those quite a bit.
[–] raquuk 20 hours ago
For anyone looking for it: here is the documentation: https://support.mozilla.org/en-US/kb/bookmarks-firefox#w_how...
[–] sylware 1 day ago
Maybe to support noscript/basic HTML browsers?