I built a tab saver that syncs through your own GitHub Gist, with no server

2026-11-29来源 dev.toEnglish

I keep a lot of tabs open. Every time Chrome crashed or I closed a window by mistake, I lost the research I had open. OneTab and Session Buddy solve this, but most tab managers want an account, or they keep your sessions on someone else's server.

So I made Safekeep, a Chrome extension that saves open tabs as sessions and restores them later. It's MIT licensed.

What it does

  • Saves all open tabs and windows with one click, or automatically every 1 to 60 minutes
  • Restores a whole session or only the tabs you pick
  • Keeps window layout, tab order and pinned state
  • Searches saved tabs by title or URL
  • Exports and imports sessions as a backup file
  • The interface is available in English, Korean, Japanese, Simplified Chinese and Spanish

Sync without a server

Local mode needs no sign-up. If you want your sessions on another computer, Safekeep can sync through a private GitHub Gist in your own account. There is no Safekeep server and no Safekeep account, so there is nothing for me to leak.

The sessions are encrypted in the browser before upload. It uses AES-GCM 256-bit, and the key comes from a passphrase you choose, run through PBKDF2-SHA-256. The passphrase stays in the extension's local storage. It is not uploaded to GitHub and it is not synced by Chrome. The catch is that if you forget it, nobody can recover your synced sessions, including me.

The only network address the extension contacts is api.github.com, and only when sync is turned on. The permissions are tabs, storage and alarms.

Things I learned building it

  • Manifest V3 service workers get shut down when idle, so a setInterval auto-save quietly stops working. chrome.alarms survives the worker being stopped.
  • A failed Gist read must never be treated as an empty Gist. Otherwise the next save overwrites everything. Safekeep stops the write when the read fails.
  • Any tab title can contain HTML. Escape titles and URLs before rendering a session list.

Links

It does not save Chrome tab groups or thumbnails yet. I'd like to hear which features you'd want next, and issues are open on GitHub.

原文:https://www.a8q9.cn/en/article/i-built-a-tab-saver-that-syncs-through-your-own-github-gist-with-no-server-c20d43.html

相关文章