Text Highlighter and Saver

Highlight selected text and save highlights to local storage

Author
Zab Kas
Daily installs
0
Total installs
32
Ratings
0 0 0
Version
1.0
Created
2023-12-06
Updated
2023-12-06
Size
2.65 KB
License
MIT
Applies to
All sites

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.