diff --git a/system/bookmarks/darkmode.js b/system/bookmarks/darkmode.js new file mode 100644 index 00000000..97f254f2 --- /dev/null +++ b/system/bookmarks/darkmode.js @@ -0,0 +1,15 @@ +// From https://www.geeksforgeeks.org/how-to-make-dark-mode-for-websites-using-html-css-javascript/ +// See also https://www.w3schools.com/howto/howto_js_toggle_dark_mode.asp +function darkMode() { + let element = document.body; + let content = document.getElementById("DarkModetext"); + element.className = "dark-mode"; + content.innerText = "Dark Mode is ON"; +} + +function lightMode() { + let element = document.body; + let content = document.getElementById("DarkModetext"); + element.className = "light-mode"; + content.innerText = "Dark Mode is OFF"; +}