A Chrome extension that imports the page you are reading into a Solveit dialog as notes. It converts the rendered DOM to markdown in the browser, so pages built by JavaScript import as you see them. It targets Solveit instances backed by RustyGate, and was tested against Solveit 0.0.117 with RustyGate 0.1.25.
- Converts the fully rendered DOM, so JavaScript-heavy sites import as displayed
- Extracts LaTeX from MathML, as on arXiv and Wikipedia
- Prepends the page's table of contents when it has one
- Picks the main article element and drops navigation, footers, cookie banners and similar
- Adds a reader style (
CRAFT.css) to the import folder
- Open
chrome://extensions/ - Turn on "Developer mode"
- Click "Load unpacked"
- Select the
solveit-readerfolder
- Sign in to your Solveit instance in Chrome
- Open the page you want to import
- Click the Solveit Reader icon and set the instance URL and the folder (default
readings) - Click "Import to Solveit"
The extension saves the dialog as {folder}/{sanitized-page-title}.ipynb, with a Source: note followed by the page content as a note, and opens it in a new tab. If a dialog with that name exists, the new one is numbered: -2, -3, and so on. You can close the popup while the import runs.
The first import into a folder also adds CRAFT.css to it. Solveit applies a folder's CRAFT.css to every dialog in that folder and its subfolders, so these dialogs read like a page: notes run as one serif column without card borders, and their buttons appear on hover or selection. Code and prompt messages keep their cards in the same column. The extension never replaces an existing CRAFT.css, so you can edit or delete it, and it adds none when the folder is empty (the root), where the style would apply to every dialog.
popup.jssaves the settings and asks the background service worker to import the active tabbackground.jsinjects Turndown andcontent.jsinto the tab and receives the page as markdowncontent.jsfinds the main content and converts it to GitHub-flavoured markdown- The worker checks
/static/{name}to find a free dialog name. It builds a notebook with two markdown cells and POSTs it to/upload_file_, the route Solveit's own Upload dialog uses - If the folder has no
CRAFT.css(/static/{folder}/CRAFT.cssreturns 404), the worker uploadscraft/CRAFT.cssthere the same way - The worker opens
/dialog_?name={name}in a new tab
Requests send your Chrome cookies for the instance, so you must be signed in to it. A 403 from the instance reports "Not signed in to Solveit".
solveit-reader/
├── manifest.json # Extension config
├── popup.html # Popup UI
├── popup.js # Settings and the import button
├── background.js # Service worker: conversion, naming, upload, reader style, open
├── content.js # DOM to markdown conversion
├── turndown.js # HTML to markdown library
├── turndown-plugin-gfm.js # GFM tables, strikethrough, task lists
├── craft/CRAFT.css # Reader style installed in the import folder
├── tests/test_import.py # Headless browser test
├── README.md
└── CHANGELOG.md
tests/test_import.py runs the extension in a headless Chrome through fastcdp, against a Solveit instance it starts on a temporary root. It needs solveit on PATH and a Chrome build that accepts --load-extension (Chrome for Testing or Chromium). Set FASTCDP_CHROME to the browser path. The default is the Playwright Chromium under ~/.cache/ms-playwright.
pytest -q
See CHANGELOG.md for version history.