0.2.0
Support a custom fallback location
Document custom search engines in Safari
A basic web server around bangin written in Node.js.
$PATH
)Run the server with:
node index.js [port] [fallback]
If no port is provided then it will default to 1234
.
If no fallback is provided it will default to DuckDuckGo. The fallback syntax mirrors that of bangin, replacing any {{{s}}}
with the search value.
Requests must include a non-empty value at querystring q
. The string will first be routed to bangin before yielding to the fallback.
The response if successful will be a 303 redirect that browsers can handle.
Examples:
$ curl -I 'http://localhost:1234?q=x!aw'
HTTP/1.1 303 See Other
Location: https://wiki.archlinux.org/index.php?search=x
[...]
$ curl -I 'http://localhost:1234?q=x'
HTTP/1.1 303 See Other
Location: https://duckduckgo.com/?q=x
[...]
chrome://settings/searchEngines
.http://localhost:<port>/?q=%s
.Firefox does not yet support fully custom search engines. You can track the relevant issue here.
Safari does not support custom search engines. Some search engines such as Kagi workaround this with a WebExtension.