diff options
author | Marvin Borner | 2019-05-13 18:18:57 +0200 |
---|---|---|
committer | Marvin Borner | 2019-05-13 18:18:57 +0200 |
commit | b9a392f5f1db5c7de60e929fdcc0ca42885f81ca (patch) | |
tree | 0f9aa014bcabfc3d7205898ada71f15d4490cb0a /src/main/resources/js | |
parent | 72073df2c225f96889620e30c963dd807ca01a90 (diff) |
Added user based dark theme support
Co-authored-by: LarsVomMars <lars@kroenner.eu>
Diffstat (limited to 'src/main/resources/js')
-rw-r--r-- | src/main/resources/js/index.js | 6 |
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(); +}); |