HTML to Markdown AI Chrome Extension

HTML to Markdown AI Chrome Extension
HTML to Markdown AI is a Manifest V3 Chrome extension that lets you select any HTML elements on a live page and convert them into clean Markdown — powered by GitHub Models.
✨ How It Works
- Open the extension popup.
- Click Start selection to enter element-picker mode.
- Click one or more HTML elements on the page to queue them.
- Click Generate Markdown to submit the selection.
- The background service worker bundles the HTML fragments and sends them to GitHub Models.
- The model returns Markdown, with each converted fragment separated by a
---divider.
🛠 Implementation Notes
- Local token storage: The GitHub Models API token is saved in
chrome.storage.local, keeping it scoped to the current browser profile. - Safe by design: The extension does not inject into Chrome internal pages (e.g.,
chrome://). - Structured output: The AI is prompted to return Markdown only, using
---to delimit each fragment. - Host permission:
https://models.github.ai/*is declared for GitHub Models inference requests.