Very well done! And only 300 lines of code. I'd suggest adding this:
dot.onclick = () => setTimeout(displayHighlightsPopup, 50);
In addition to that, if possible, your highlighter could show all domains with highlights.
Another useful addition would be sharing a page with someone with your highlights. Even here, on HN, someone could read an article and share a link with highlights added. The highlights themselves could go to the URL #hash part. This could be used together with the Archive.is snapshots.
Edit: A simpler feature would be saving a summary of all highlights in a basic text form that can be easily shared here or anywhere else, really. It's very handy when you're reading a long page, keep highliting interesting parts and at the end get the summary.