- https://github.com/t3dotgg/unduck
- https://youtu.be/_DnNzRaBWUU
---
Note unduck works without service workers: https://github.com/t3dotgg/unduck/blob/91a66c25de8b0e7ac5ba5...
Is there any advantage to using service workers?
edit: Ah... unduck doesn't work from the browser search bar.
https://github.com/t3dotgg/unduck/blob/91a66c25de8b0e7ac5ba5...
—-
> Is there any advantage to using service workers?
With service workers we can intercept the `fetch` request, before the index.html gets rendered/loaded. One should (in theory) be redirected some micro-seconds faster than doing the redirect in the index.html js
trbndev•2mo ago
What sets it apart:
- Runs entirely locally (no network, no tracking)
- Lets you define your own bangs and destinations
- Optionally rewrites queries for better precision (with AI)
Example:
Typing `article about german war in the stone age !!g` becomes: `site:en.wikipedia.org "german" AND "war" AND "stone age"`
More on query rewriting and performance:
https://tl128n.github.io/writings/2025-05-02_optimizing_sear...
Leftium•2mo ago
trbndev•2mo ago
Leftium•2mo ago
I wonder how much of that could be done without AI, just (locally) using https://www.npmjs.com/package/compromise
---
Also I couldn't find your source for bang data; Kagi maintains an updated list: https://github.com/kagisearch/bangs
I'm working on an enhanced version of bangs. Since there are so many "dead" bangs, I'm thinking of using a bang whitelist and suggestions from the full list if not found in the whitelist.
trbndev•2mo ago
—-
The bangs are at
https://github.com/t128n/routr/blob/main/src/sw/routes.ts
Mostly ripped from duckduckgo.com/bang.js and then pretty-formatted with Prettier… with some sane-defaults added like a bang for ChatGPT or T3 Chat