Single‑file site search redirect page. Map a short query keyword to a target site using regex patterns and redirect immediately. Meant to be used in a Chrome custom search engine (keyword -> URL?q=%s).
- Single HTML file with inlined JS and CSS for minimal latency
- Pattern list: array of { pattern, url } (JS regex + URL template with $1)
- Immediately redirects to the first matching pattern when
?q=is present - Shows a simple table of patterns when no query is provided
- No dependencies, no build step
- Configure Chrome custom search engine:
- Search engine: Quick Search
- Keyword: q
- URL: file:///path/to/index.html?q=%s (or https://your-host/index.html?q=%s)
- From the address bar use:
q gh typescript→ redirects to GitHub search for "typescript".
- Add new entries to the PATTERNS array in the file: each entry must include a capturing group and a
$1placeholder in the url template.