summaryrefslogtreecommitdiff
path: root/reference/js/toggleTheme.js
diff options
context:
space:
mode:
Diffstat (limited to 'reference/js/toggleTheme.js')
-rw-r--r--reference/js/toggleTheme.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/reference/js/toggleTheme.js b/reference/js/toggleTheme.js
new file mode 100644
index 0000000..cfc1394
--- /dev/null
+++ b/reference/js/toggleTheme.js
@@ -0,0 +1,7 @@
+function toggleTheme() {
+ if (localStorage.getItem("theme") === "light") {
+ setTheme("dark");
+ return;
+ }
+ setTheme("light");
+}