fixed stuff and improved the rendering engine by making inline math available using $$ and for ml $$\ncontent\n$$
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
/*
|
||||
* We autoset the CSS to darkmode if no choice is in localstorage
|
||||
* Else we allow White styles cause it doesnt look too bad
|
||||
*/
|
||||
function toggleDarkMode() {
|
||||
document.body.classList.toggle("dark-mode");
|
||||
localStorage.setItem("dark-mode", document.body.classList.contains("dark-mode"));
|
||||
}
|
||||
|
||||
// Apply stored preference when the page loads
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
if (localStorage.getItem("dark-mode") === "true") {
|
||||
const stored = localStorage.getItem("dark-mode");
|
||||
|
||||
if (stored === null || stored === "true") {
|
||||
document.body.classList.add("dark-mode");
|
||||
} else {
|
||||
document.body.classList.remove("dark-mode");
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user