Browser extension (Firefox + Chrome, Manifest V3) that saves the current page as Markdown to a GitHub repository via a personal access token.
shared/ Code identical across browsers (popup, options, content script, libs, icons, GitHub commit core)
firefox/ Firefox-specific manifest + background entry (background.scripts + gecko settings)
chrome/ Chrome-specific manifest + background entry (service worker)
build.sh Combines shared/ with each browser dir into dist/<browser>/
./build.sh
Outputs dist/chrome/ and dist/firefox/, each a self-contained unpacked extension.
- Open
chrome://extensions - Enable Developer mode (top right)
- Click Load unpacked and select
dist/chrome
- Open
about:debugging#/runtime/this-firefox - Click Load Temporary Add-on…
- Select
dist/firefox/manifest.json
- Create a GitHub PAT:
- Classic: scope
repo - Fine-grained: repository access + Contents: Read and write
- Classic: scope
- Open the extension's Options page.
- Paste the token.
- Add one or more repositories (owner, repo, branch, default folder).
- Save.
Click the toolbar icon on any page:
- Pick a repo from the dropdown
- Adjust folder and filename if desired
- Click Save as Markdown
The page is extracted with Mozilla Readability, converted to Markdown with Turndown, and committed via the GitHub Contents API. Existing files at the same path are updated (new commit with the prior sha).
shared/lib/browser-shim.jsaliaseschrometobrowserso popup/options/content code can use a single API surface. Loaded first inpopup.htmlandoptions.html.shared/background-core.jsholds the GitHub commit logic. Each browser'sbackground.jsregisters the message listener using its native pattern:- Firefox: async listener returning a Promise.
- Chrome: listener returns
trueand replies viasendResponse(service worker constraint).
shared/popup.{html,js}— toolbar popup (repo picker, filename, save)shared/options.{html,js}— PAT + repo list configshared/content.js— runs on the page, extracts + converts to Markdownshared/background-core.js— GitHub commit logic shared by both browsersshared/lib/Readability.js,shared/lib/turndown.js— vendored librariesshared/lib/browser-shim.js— chrome → browser aliasfirefox/,chrome/— per-browsermanifest.jsonandbackground.js
The PAT is stored in browser.storage.local (unencrypted at rest). Appropriate for personal use; don't use a token with scopes beyond what you need.
See PRIVACY.md for the full privacy policy.