From 61fad848c8c4e5c20f1ff8d197dc945d3af813b9 Mon Sep 17 00:00:00 2001 From: bhomie Date: Tue, 16 Jun 2020 20:59:36 -0700 Subject: [PATCH] color selectors now work --- public/index.html | 14 +++++++------- public/js/settings.js | 9 +++++++-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/public/index.html b/public/index.html index 5572283a2..924979a1e 100644 --- a/public/index.html +++ b/public/index.html @@ -429,19 +429,19 @@
- + - + - + - + - + - + - +
diff --git a/public/js/settings.js b/public/js/settings.js index 401aa3e34..13eb9917a 100644 --- a/public/js/settings.js +++ b/public/js/settings.js @@ -458,6 +458,11 @@ $(".tab").click(e => { $('[tabContent="custom"]').addClass("reveal") }, 250); } - console.log($target.attr('tab')) - +}) + +$('.colorPicker').change(e => { + var $colorVar = $(event.currentTarget).attr('colorVar') + var $pickedColor = $(event.currentTarget).val(); + + document.documentElement.style.setProperty($colorVar, $pickedColor) })