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