aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/js/index.js')
-rw-r--r--src/main/resources/js/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/resources/js/index.js b/src/main/resources/js/index.js
new file mode 100644
index 0000000..4939622
--- /dev/null
+++ b/src/main/resources/js/index.js
@@ -0,0 +1,6 @@
+document.querySelector("#toggle").addEventListener("click", () => {
+ const request = new XMLHttpRequest();
+ request.open("POST", "/user/theme");
+ request.onload = () => location.reload();
+ request.send();
+});