Text worth remembering gets lost the moment a tab closes. Simple Highlights solves that: a Chrome extension (Manifest V3) that lets anyone mark text on any website and get it back automatically the next time they visit the same page — no account, no cloud service, no setup beyond installing it.
The workflow is deliberately minimal:
- Select text on any page.
- Highlight it with a floating toolbar.
- Revisit the page later and see the highlight restored.
- Open the popup to search, sort, filter, and browse the saved library.
| Floating toolbar & color picker | Highlighted passage | Popup library |
|---|---|---|
![]() |
![]() |
![]() |
- Highlights survive page reloads, dynamic content, and single-page app navigation — restoration isn't limited to a static page load.
- Four pastel highlight colors, applied through a compact floating toolbar with no page redirection or extra clicks.
- A persistent local library in
chrome.storage.local, with full highlight text stored (no length cap, no truncation-driven data loss). - A restoration algorithm that matches text spanning multiple DOM nodes and disambiguates repeated phrases using surrounding context.
- A popup library with live search (accent- and punctuation-tolerant), four sort modes, site/color filters, and grouped or flat views — all preferences persisted across sessions.
- One-click navigation from a saved entry back to its highlight, opening the source tab if it isn't already open.
- Delete a highlight from the popup directly, without needing to revisit the page.
- Full library export and import as JSON, for backup or migration between profiles.
- Every storage write is serialized through the background service worker, so concurrent tabs can't silently overwrite each other's highlights.
The extension UI is currently in Spanish, including popup labels, helper copy, and interaction messages. This documentation is written in English to keep the project accessible to a broader developer audience.
A floating toolbar appears near the current text selection, letting the user apply a highlight or switch colors in place. The last color chosen is remembered for the session, with a checkmark marking the active swatch.
Hovering an existing highlight reveals a Remove button that stays visible briefly and fades out rather than disappearing abruptly. Highlights can also be deleted directly from the popup library; any open tab currently showing that highlight removes it live, via a background broadcast.
Each saved highlight records:
- Unique id.
- Original page URL and hostname.
- Page title.
- Full highlight text — stored without truncation, so long selections restore correctly.
- Selected color.
- Creation timestamp.
- Prefix and suffix context, used to disambiguate repeated text on restoration.
Highlights restore automatically on return visits to the same URL, including a retry pass for content that renders after document_idle. Matching isn't limited to single text nodes, and repeated text is resolved accurately through stored context. On single-page apps, a URL-change watcher unwraps stale highlights and re-runs restoration for the new route without requiring a full page reload.
The popup surfaces the full saved collection with live, accent-tolerant search; sorting by relevance, newest, oldest, or site A-Z; filtering by site and by color; and a toggle between grouped-by-site and flat-list views. All of these preferences persist across popup sessions. Per-entry actions let a user jump straight to a highlight's tab (opening the page if it's closed), delete the entry outright, or export/import the entire library as a JSON file — re-importing the same file is a safe no-op, since existing ids are skipped.
SIMPLE-HIGHLIGHTS/
manifest.json
README.md
scripts/
generate-icons.ps1
src/
assets/
icons/
icon-16.png
icon-32.png
icon-48.png
icon-128.png
background/
service-worker.js
content/
content-script.js
modules/
floating-toolbar.js
highlighter.js
selection.js
spa-watcher.js
state.js
styles/
highlight.css
popup/
popup.css
popup.html
popup.js
shared/
highlight-library.js
- Built as a Chrome Extension using Manifest V3, with a background service worker as the single writer for
chrome.storage.local. Content scripts and the popup reach it viachrome.runtime.sendMessage, closing a race condition where two tabs saving near-simultaneously could otherwise drop one highlight. - DOM manipulation relies exclusively on safe APIs —
Range,Selection,createElement,textContent— with noeval()orinnerHTMLin core UI rendering. chrome.storage.localholds both the highlight library and popup preferences.- The
tabspermission lets the popup locate, focus, or open the tab a highlight belongs to, and lets the background worker broadcast removals to any open tab.
- Strict extension page CSP:
script-src 'self',object-src 'none',base-uri 'none'. - Minimal permission scope:
storageandtabs. - No deprecated background page model.
- Open Chrome and go to
chrome://extensions/. - Enable Developer Mode.
- Click Load unpacked.
- Select the
SIMPLE-HIGHLIGHTSfolder. - Open a website and select text.
- Use the floating toolbar to highlight.
- Open the extension popup to browse the saved library.
- Select a piece of text and click
Highlight. - Hover the highlight later to remove it, or delete it from the popup.
- Open the popup to search, filter, or organize saved highlights.
- Use "Abrir" on a popup entry to jump straight back to that highlight, even in a closed tab.
- Reopen the same page later and let the extension restore the saved marks.
- Export the library periodically as a backup, or import one on a fresh profile.
- Restoration is tied to the exact URL saved with the highlight, including query strings — pages that append volatile parameters won't match.
- Extremely dynamic pages can still produce edge cases where restoration is incomplete.
- The icon set is a generated placeholder, not a designed brand asset.
- Optional sync support for the highlight library and settings.
chrome.storage.synccaps out at 100KB total / 8KB per item, too small for a full library with saved text and context — whether to sync settings only or build a quota-aware chunked library sync is an open decision, parked for a future pass. - Combined per-color and per-site saved views (named smart filters).
- A dedicated icon/brand design to replace the generated placeholder.


