Hello Jean, The code Aaron provided is quite nice, but I suggest to rather use a linked stylesheet like
<link id="syntax-highlighting" href="no-highlighting.css" rel="stylesheet" type="text/css" /> And then use JS like document.getElementById("syntax-highlighting") = "highlighting1.css" This results in less complicated JS and allows for multiple styles. Cheers, Valentin Am Dienstag, 4. Jänner 2022, 20:32:50 CET schrieb Jean Abou Samra: > > [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
signature.asc
Description: This is a digitally signed message part.