> If you visit my website, I am granted the honour and the privilege of executing arbitrary Javascript on your computer.
>
> This is a pretty bad idea
This is why I disable javascript by default, but I suspect that on this page it's needed to fix the theme or something, because the text is light grey on a white background, and all monospace sections are completely illegible.
Edit: I don't mean to hate on the author, the content of the article is really interesting!
> I suspect that on this page it's needed to fix the theme or something, because the text is light grey on a white background, and all monospace sections are completely illegible.
You seem to be correct. I found a single <script> tag in the source, with the following code:
(() => {
let v = localStorage.getItem("color-scheme"),
a = window.matchMedia("(prefers-color-scheme: dark)").matches,
cl = document.documentElement.classList,
setColorScheme = v => (!v || v === "auto" ? a : v === "dark") ? cl.add("dark") : cl.remove("dark");
setColorScheme(v);
window.setColorScheme = v => {
setColorScheme(v);
localStorage.setItem("color-scheme", v)
};
})();
Though I don't see what's the point of this since the "light" theme, as you've pointed out, is completely illegible.
This is why I disable javascript by default, but I suspect that on this page it's needed to fix the theme or something, because the text is light grey on a white background, and all monospace sections are completely illegible.
Edit: I don't mean to hate on the author, the content of the article is really interesting!