From 1f9dde81d41120a9d469074fea026de520492ea1 Mon Sep 17 00:00:00 2001 From: Frankie B Date: Fri, 12 Jul 2024 16:58:31 +0100 Subject: Add apply button to scheme swap, make it easier to read --- public/js/schemeSwap.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'public/js/schemeSwap.js') 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")}`) -- cgit v1.2.3-54-g00ecf