Back up website localStorage to Google Drive. Chrome extension + mobile bookmarklet.
Back up and restore any website’s localStorage to your own Google Drive. Ships as a Chrome extension (background auto-backup on a schedule) and a mobile bookmarklet (manual + catchup-on-tap).
Primary use case: preserving save data from browser-based idle/incremental games like Cookie Clicker, Universal Paperclips, A Dark Room.
src/extension/) — auto-backup on a schedule via chrome.alarms, restore + tab reload, per-site settings. OAuth via chrome.identity.src/bookmarklet/) — lightweight Shadow-DOM overlay injected into any page. Manual backup + catchup-on-tap auto backup. OAuth via Google Identity Services token flow (no client secret needed).src/core/) — shared Drive client, rotation logic, types.npm install
npm run build # builds extension + bookmarklet into dist/
npm run watch # rebuild on save
npm run typecheck # tsc --noEmit
Loading the extension locally: chrome://extensions → enable Developer mode → “Load unpacked” → select dist/.
Local bookmarklet testing:
cd dist/bookmarklet && npx serve -p 3000
Set AUTH_URL in src/bookmarklet/config.ts to http://localhost:3000/auth.html, rebuild, visit http://localhost:3000/, drag the install link to your bookmarks bar.
Two separate OAuth clients — one per surface.
chrome://extensions after loading.src/extension/manifest.json under oauth2.client_id.Chicken-and-egg for CWS submission: the Chrome extension OAuth client is bound to a specific extension ID. Your unpacked local dev ID is different from the stable ID CWS assigns on upload. Two ways to handle this:
manifest.json, re-upload."key" field to manifest.json with a fixed public key to pin the extension ID across unpacked and CWS.auth.html (e.g. https://hpp3.github.io, http://localhost:3000).src/bookmarklet/config.ts..../auth/drive.file and .../auth/userinfo.email. Both are non-sensitive; no Google verification required.npm run build, verify dist/ loads cleanly as an unpacked extension.dist/ contents: cd dist && zip -r ../localstorage-backup.zip .localstorage-backup.zip.STORE.md. Privacy policy URL: https://hpp3.github.io/localstorage-backup/PRIVACY.STORE.md.drive.file scope restricts the extension to files it created — no broad Drive access.chrome.alarms (30s min period); catchup-once semantics so missed intervals trigger one backup, not a pile-up.visualViewport-aware positioning to survive host pages that force a <meta viewport>.src/core/drive-client.ts — platform-agnostic (callback-injected token getter).MIT — see LICENSE.