aboutsummaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorFrankie B <git@diskfloppy.me>2024-07-12 16:58:31 +0100
committerFrankie B <git@diskfloppy.me>2024-07-12 16:58:31 +0100
commit1f9dde81d41120a9d469074fea026de520492ea1 (patch)
tree93d450cef1a803d9c7c6e1d408b1adefe09da189 /public/js
parent79ba94714809af2dc26abd2007a042d456445c76 (diff)
Add apply button to scheme swap, make it easier to readv2024.07.12
Diffstat (limited to 'public/js')
-rw-r--r--public/js/schemeSwap.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/public/js/schemeSwap.js b/public/js/schemeSwap.js
index 3baa09b..f51443d 100644
--- a/public/js/schemeSwap.js
+++ b/public/js/schemeSwap.js
@@ -46,7 +46,8 @@ function cookieExists(cname) {
* Swaps the colorscheme
* @param {string} scheme Color scheme ID
*/
-function swapScheme(scheme) {
+function swapScheme() {
+ let scheme = document.getElementById('scheme-selector').value ;
setCookie("colorscheme", scheme, 90);
document.getElementById("css-colorscheme").href = `/css/colorschemes/${scheme}.css`;
console.log(`Set colorscheme to ${getCookie("colorscheme")}`)