Text Highlighter and Saver

Highlight selected text and save highlights to local storage

Autor
Zab Kas
Instalaciones diarias
0
Instalaciones totales
32
Calificaciones
0 0 0
Versión
1.0
Creado
06/12/2023
Actualizado
06/12/2023
Tamaño
2.65 KB
Licencia
MIT
Funciona en
Todos los sitios

Title: Text Highlighter and Saver

Short Description: Automatically highlights selected text on a webpage and saves these highlights for future reference.

Detailed Description:
The Text Highlighter and Saver UserScript is designed to enhance your web reading experience by allowing you to highlight and save important text directly on web pages. It's particularly useful for research, studying, or when revisiting websites and wanting to quickly find previously noted information.

Key Features:

Text Highlighting: Simply select the text you wish to highlight, and it automatically gets a yellow background.
Persistent Highlights: Highlights are saved to your browser's local storage, ensuring that they persist across page reloads and browser restarts.
Automatic Reload: Previously highlighted texts are automatically reloaded and highlighted when you revisit a page.
How It Works:

The script listens for a text selection event (mouseup).
Once text is selected, it wraps the selected text in a span element with a yellow background.
The script saves the start and end points of the selection in the local storage, keyed by the page's URL.
Upon revisiting the page, the script checks for saved highlights and re-applies them to the text.