Files
stash/extension/options.html
Fredrik Johansson f2ebfe35d4 Initial build: stash server + browser extension
Server (Express + better-sqlite3 + FTS5, mirroring keep's stack):
/api/capture (upsert-on-url, per PROPOSAL.md's dedup decision),
/api/articles (list/search/mark-read/delete), plus a minimal
server-rendered reading list and reader view at / and /read/:id
(token passed as ?t= there since browser navigation can't set an
Authorization header). Bearer-token auth generated via `npm run
token` — no login flow, matching keep's one-time identity
registration pattern.

Extension (Manifest V3, sideloaded, no store distribution): toolbar
click or context menu "Send to stash" runs @mozilla/readability
(vendored into extension/lib/) against the current page, falling back
to raw rendered HTML when extraction comes back too thin. Options
page for one-time server URL + token entry.

Verified end-to-end with the real extension loaded in a live Chromium
instance (not just unit-tested extraction logic): capture against a
real page, dedup-on-recapture, mark-read, FTS5 search, 401 on missing
auth, and both server-rendered views all confirmed working.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-12 23:23:01 +02:00

28 lines
864 B
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>stash settings</title>
<style>
body { font-family: system-ui, sans-serif; max-width: 420px; margin: 30px; }
label { display: block; margin-top: 14px; font-size: 13px; color: #555; }
input { width: 100%; padding: 6px; margin-top: 4px; box-sizing: border-box; }
button { margin-top: 16px; padding: 8px 16px; }
#status { margin-top: 10px; font-size: 13px; }
</style>
</head>
<body>
<h2>stash settings</h2>
<p>Generate a token on the server with <code>npm run token</code>, then paste it below.</p>
<label>Server URL
<input id="serverUrl" placeholder="https://stash.example.com">
</label>
<label>Token
<input id="token" placeholder="paste the token here">
</label>
<button id="save">Save</button>
<div id="status"></div>
<script src="options.js"></script>
</body>
</html>