No description
- TypeScript 90.6%
- HTML 6.4%
- Dockerfile 3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| extension | ||
| scripts | ||
| src | ||
| test | ||
| .dockerignore | ||
| .gitignore | ||
| bun.lock | ||
| docker-compose.yml | ||
| Dockerfile | ||
| index.ts | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
sourcedump
A small Bun/TypeScript app that saves the URLs of all currently open Chrome tabs.
It has two parts:
- a Bun web service with SQLite storage
- a Chrome extension that dumps tabs when its shortcut is pressed
Service
Install dependencies:
bun install
Run the service:
SOURCEDUMP_TOKEN=change-me bun run dev
On PowerShell:
$env:SOURCEDUMP_TOKEN = "change-me"
bun run dev
Configuration:
SOURCEDUMP_TOKENis required.SOURCEDUMP_DBdefaults tosourcedump.sqlite.PORTdefaults to3000.
Endpoints:
POST /api/dumpaccepts{ "tabs": [{ "url": "...", "title": "...", "windowId": 1 }] }.GET /returns all saved URLs astext/plain, one URL per line.GET /healthreturns a simple health response.
Authenticated requests use Authorization: Bearer <token>. For opening the plain list in a browser, GET /?token=<token> is also accepted.
Chrome extension
Build the extension:
bun run build:extension
Build a distributable ZIP:
bun run build:extension:zip
The ZIP is written to out/sourcedump-extension.zip. Unzip it and load the extracted directory with Chrome's Load unpacked flow.
Load it in Chrome:
- Open
chrome://extensions. - Enable Developer mode.
- Choose Load unpacked.
- Select the
extensiondirectory. - Open the extension options page and set the service URL and token.
The default shortcut is Ctrl+Shift+Y. Chrome does not allow F24 as a default extension command key, but shortcuts can be reviewed or changed at chrome://extensions/shortcuts.
Development
bun run typecheck
bun test
bun run build:extension
bun run build:extension:zip