[Aaron] It is fairly straightforward with CSS and a little JavaScript:
Yeah, that is also what I was starting to muse with more seriously. Thanks for providing ready-made code. Forgive my igorance with the inner workings of the Internet: what does this mean in connection with GDPR and all that? Am I right that the fact that the information stored on the user's device serves a purpose essential to satisfying the very request of the user means that it would fall under PECR exceptions to the requirement of a banner asking for explicit consent of the user? Otherwise, as far as I can read, the requirement is that you must ask for permission before storing or using the data, so this permission could be asked to the reader just when toggling highlighting and not for everyone reading the documentation, right? I'm a bit at loss trying to understand what is OK or not in this respect. Other than that, well, there is still JavaScript. That's may not be the thing to be most happy about, but we could check how LibreJS handles that JavaScript, possibly adding stylized license comments, so that it would be no problem to those people refusing non-free JavaScript using LibreJS/IceCat. All in all this approach does look promising to me. [Wol]
Is that on the web page, or down to the reader?
On the web page. Regards, Jean