jeromepl / highlighter Goto Github PK
View Code? Open in Web Editor NEWA Chrome extension to highlight text and keep it all saved
License: MIT License
A Chrome extension to highlight text and keep it all saved
License: MIT License
For v5 I would like to add a new way of serializing highlights that is more robust to dynamic webpages or changes to static pages.
Instead of using an anchor and focus elements that are serialized by CSS query selector, I think a smarter scheme could be designed by finding a parent element that has "sufficient" chance of being unique. This parent could be identified by content (hash), rather than by query selector. within this parent then, we can have the query selector for the focus and anchor.
Note that this is not resistant to changes in the rest of the content within this parent selector, which might make it worse in some cases. Anyway, I believe there is a lot of room for improvement for robustness of storing and restoring highlights
I'm making a flash card app that can create cards from highlights online and I came across your extension. I didn't see a license, and I used some parts of your code in my project. I hope that's alright!
It's an open source project, and if you want to get involved we'd love to have you!
https://github.com/IPFC/
https://github.com/IPFC/ipfc-extension
Insert newline between highlights when coping all
First, I really like this extension. It helps a lot while reading documentions. Thanks!
I think a overall panel (e.g. using options page) allowing organize or just simply view all highlights would be a great feature to have.
Add a way to copy all highlighted text to the user's clipboard.
Feature requested through a chrome web store review.
It would be nice to be able to turn off all of the highlights on a particular page, without deleting them.
When I highlight lots of stuff, I want to be able to turn the highlights off and view the original page, and then switch them back on. I don't want to delete the highlights and re-create them.
This would be particularly useful when you are not sure which highlights you created, or if some of them were already highlighted on the original page.
Requested by a user via email
Do you have a Privacy Policy and or Terms of Service Document that we can look at to evaluate this extension for our Students?
Thanks in advance,
First off, I think the project is super cool and awesome that you made it open source and I just stumbled upon it!
This feature request is sort of two pronged. Need to dive into your code a bit more, but it would be really cool to share your highlighted page with others. Not sure how possible it is if you are just storing everything locally.
Second thing is, I often feel most users skim articles, but I'd imagine most of your user base actually reads through articles. Why not offer users summarized articles based on the keywords and sentence structures they highlight - it could be a pretty simple model - not sure if you are analyzing this data already but could be interesting!
Defined as a background script in the manifest and missing in repository
As requested on Chrome web store support page
This command would be useful in the scenario where a new highlight (whether caused by a bug or by the user) covers previous highlights. In this case, re-highlighting the text will not add back the covered highlights
Hi Jerome,
Highlighter 401
is awesome! .
Simple Important suggestion:
==> Allow user to select a default highlight color in options.
Highly useful for many of your Users!!.
Reason:
Every time I select and ALT+H
a text on the page,
Highlighter forces me to accept YELLOW
as a default color..
But my favorite highlight BKG color choice
is lilac = violet.
Much more readable in my case...
So, every time I highlight
I have to manually select: lilac
from the Highlighter Color Palette...
Instead,
I need lilac
to be my default highlighting color!.
Hope you can include
this important color default option,
as soon as possible.
Merci / Thanks Jerome!.
SFd99
San Francisco
Hello, thanks for this great extension.
One feature Iโd love to see is a list of pages that contain highlights.
It would be useful to know in which pages I have highlighted text.
I often highlight text on a page for a quick task, close the tab and forget about it. Over time Iโd end up with hundreds of pages with highlighted text, but no easy way to access them. (I primarily would access them to delete all their highlights, but I imagine many users would benefit from accessing them to check something up.)
I'm guessing in a local storage that Chrome has.
What happens if I reinstall Chrome? Do I lose the highlights?
If the webpage is changed and part of the highlighted text is gone, will it still highlight some of it?
If it's a local storage, I'm guessing I'll have different sets of highlights having this Chrome plugin (automatically synced) across computers.
This info might be useful to have as part of the extension description in the Chrome store.
I find this plugin so useful to highlight documentation. Thanks ๐
This will allow (in the future) having a view showing highlights from any source webpage with links to go to the highlights
hi, there is not any option to change the highlight color on the right-click menu, you should go to the extension and change the color then come back select the word and highlight it. I think it will be better to choose a color on right-click menu, a sub-menu for colors.
Please give a menu where the text highlighted earlier is shown even when your extension is not able to locate it on the webpage because it has now been modified.
The extension no longer works for me. Now when I refresh the page the highlighted text is no longer there.
This extension is precisely what I was looking for, except for one caveat: I'm always using the Dark Reader extension, which makes all web pages dark.
Since the text becomes white, highlighting it with the light colors available renders it almost impossible to read. Would it be possible to add some options for white text as well? One single custom color option would also do the trick.
An example webpage that uses an embedded iframe this way: https://a16z.com/about/jobs/?gh_jid=4167628003
Feature request from chrome reviews
It would be nice to preserve HTML links in the copy-pasted text.
To be seen if we should also keep other types of text formatting such as bold, italics and underline...
Requested by a user.
I think the default for this should be no keyboard shortcut, but it would be nice for users to be able to set these shortcuts themselves similarly to the "highlight selected text" shortcut
I'm trying to build a release by npm run release
as documented, but I get Error: Cannot find module './package.json
.
versions:
$ node -v
v16.13.2
$ npm -v
8.1.2
reproduction:
$ git clone https://github.com/jeromepl/highlighter.git
$ cd highlighter
$ npm i
$ npm run-script release
> [email protected] release
> node scripts/release.js
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module './package.json'
Require stack:
- /home/user/pg/highlighter/scripts/release.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/user/pg/highlighter/scripts/release.js:9:21)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/home/user/pg/highlighter/scripts/release.js' ]
}
Thanks.
I used to mark multiple sentences from a single blog post.
Then I hit "Copy all" button in the extension and pasted in my notes.
What happened is that, the whole texts pasted like a single paragraph instead of multiple short paragraphs.
This is causing additional manual work to separate the highlighted lines.
I hope you'll fix it soon.
I highlighted text on Quora and Wikipedia and after a few days it was all lost. At least get a menu where the highlighted text is listed even when your extension is not able to locate it on the webpage.
Hello,
I try to use Highlighter on https://energieberatung.elearning-home.de/, but it will not display highlights after reloading a page. The portal uses dynamic php web pages, URL ending "view.php?id=2226&chapterid=2598" for example. On static web pages the highlights are shown also after reloading.
I use Chrome version Version 109.0.5414.120 and Highlighter version 4.0.4 on Windows 11.
Hope someone can help. Just tell me if you need more information.
Hi Jerome,
Thanks for the amazing library. I am thinking of adding note functionality similar to BeanNote (https://chrome.google.com/webstore/detail/beanote-note-taking-on-we/nikccehomlnjkmgmhnieecolhgdafajb).
I can try to implement it similar to how the current in-place highlight works, but I was wondering if you had any thoughts or recommendations. Happy to open pull requests once it's implemented.
Best
When using this extension on D&D Beyond if I make a highlight then all of their hover tooltips stop working. Any ideas on this and how to prevent it from doing that?
For example, go to this page: https://www.dndbeyond.com/sources/basic-rules/combat and scroll down until you see either a bold green word or red words and hover your mouse over them. Above your mouse, you should see a box that floats over the page with information in it. If you then highlight a word with this extension and then try to hover over the colored word you first hovered over you'll see that the tooltip/card doesn't popup anymore.
Let me know if there's any more information I can provide or if you could point me in the right direction on solving this issue.
Thanks,
Dakotah
Hi,
Thank you for this great extension.
Maybe an idea to look into the DOM manipulation of this extension? It seems that it overrules any other highlighters until and unless the page is refreshed.
This gif showcases the issue.
Environment
Chrome version: 101.0.4951.41
It no longer highlights any selected text.
Tested on 2 latest versions of Chromium-based browsers: GoogleChrome and Opera
I clicked to work with local pdfs through extension settings of Chrome.
Sadly it doesn't work , maybe implementing save of annotated file (or give user option to download a local pdf after annotation complete in his work session)
would be easy to do first thing i believe rather than integrating cloud
gmail's very non-static nature makes it hard for this extension to work and properly save the highlights, but I think something can be hacked in specifically for this website as it seems to be a very common use case of this extension to highlight email contents.
This was requested by multiple users
Ok, I'm a dreamer :) - but I'd love to be able to do this:
When clicking on the extension menu - have a link to My collection -> a page where I'd see all my highlights with links to the original source, grouped by page, but filterable by color, date, site, and with a keyword search too
I'm not a dev, so... this is as far as I can go :)) - but happy to test and provide feedback if ever :)
PS Great extension - life saver!
Hi, would be nice to make the extension work on Azure DevOps they have dynamic data loading across the page and the extension is sometimes not running, i noticed this when i use mouse shortcut "go further" or back, i guess it's a problem about the "loading state" as document.readyState is in the cache maybe ???
Nothing happens
According to https://github.com/jeromepl/highlighter/blob/master/src/contentScripts/highlighterCursor/index.js it seems the highlight mode should be enabled w/ cursor changed, but cursor doesn't change
Probably cursor.png is absent in assets and that might be a reason of non working feature https://tppr.me/sZFJr
hi, check out this link. there's a problem here when I highlight a two-syllable word like chronic liver
it removes the white space between each syllable.
browser: Chrome 106.0.5249.119 (Official Build) (64-bit) (cohort: Stable)
Adding this would allow users to more easily sync their highlights between devices while keeping the extension completely free to use as there would be no need to pay for storage servers
https://github.com/jeromepl/highlighter/blob/v4.0.4/src/contentScripts/highlight/remove.js#L13
In remove.js
, it updateStorage()
rather than removeHighlight()
Is it possible to remove the highlight instead?
This extension has been amazing and working flawlessly for me for at least the past year. Would love an option that would allow us to reload or reapply highlights that are still saved in the cache or log history. Typically, to my surprise, it has worked automatically on Chrome tabs that are web pages or PDF loaded pages within the browser upon restart of chrome after a crash or update. Similar to how all tabs from your last session are restored when Chrome reloads, it also restores all the highlighted text on the tabs and pages that were previously highlighted.
However, have run into the issue recently where Chrome or the computer made Chrome crash (not sure which) And all system or app crash logs and data dumps didn't show anything. I know this is odd, but once restarting Chrome none of the tabs from previous session loaded. Luckily I have running as another extension, sessionbuddy, And was able to restore all tabs but all highlighted texts were obviously missing. Had been working on some of the important stuff for the past 5 months and this unfortunate issue occurred. I noticed in the extension apps data folder there is a log file with name "0000003". It actually possesses all previous texts I had ever highlighted or deleted and cleared from all pages. Luckily I found this and have been going through it manually to find each website and text that was highlighted but I feel like there should be a way to reload this simply, especially when looking at The code and programming of loading all highlights and references to the error manager and other JS script files that the extension possesses.
Users are expecting this to work on PDFs, but I haven't found a way to make that work yet. For now, disable the extension on open PDF pages.
Should be a simple change to the manifest.
I use Opera desktop, a Chromium browser, on MS Win 10. Highlighter, installed via Chrome Web Store, has been reliable and helpful. I like the simplicity quite a lot(tho' do wish for more colors). Thank you for making it available.
However, "Highlighter" stopped working properly a few weeks ago(Sep 2021) and extension is still broken: a)Won't separate individual text highlights for copy and instead copies all highlights on a page. b)Forces all highlights to be same color when the color is changed for one highlighted text section. The latter is quite irritating since there is no work around and I use the colors to indicate level of importance and to make scanning the text later for important points easier/faster. Those two issues make it functionally useless for me.
Also, c) months ago it began highlighting some text that I never highlighted on certain web pages. It appears random but M/B position related as sometimes only part of a sentence is highlighted and the color is inconsistent with other nearby text. AFAICT, the text that gets highlighted is new text that was not present the last time I visited the page. The pages are web pages that are updated regularly(several times a week), as well search engine pages; have never seen that occur on any other type of page. Notably, Text that I did highlight in sections that have not changed remains as was originally highlighted.
Thanks for listening and please fix, IYC.
UPDATE:
I just tested it with Edge 94.0.992.50 browser.
The individual section copy works, and "Copy All" separates the paragraphs but has no bullets. The individual section colorization highlighting is working w/o changing all other sections also.
I don't/won't use Edge, except as a second source to see if Opera is crazy or it's me, :).
Anyway, these issues seem to be only specific to certain chromium based browsers, Opera in particular.
I still need it fixed if you can. I cannot as my javascript skills are ancient.
Requested by a user on the chrome web store page.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.