From dff5675a0c7fe55df8ff2812f70dbb2bec4587a2 Mon Sep 17 00:00:00 2001 From: Jasper van Merle Date: Fri, 12 Jul 2019 17:20:52 +0200 Subject: [PATCH] Re-factoring --- assets/javascripts/app/settings.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/app/settings.coffee b/assets/javascripts/app/settings.coffee index 636da4e0..1d2e43bd 100644 --- a/assets/javascripts/app/settings.coffee +++ b/assets/javascripts/app/settings.coffee @@ -120,7 +120,8 @@ class app.Settings classList = document.documentElement.classList classList.toggle('_theme-default', !enable) classList.toggle('_theme-dark', enable) - $('meta[name=theme-color]').setAttribute('content', if enable then '#1c1c1c' else '#eee') + color = getComputedStyle(document.documentElement).getPropertyValue('--headerBackground').trim() + $('meta[name=theme-color]').setAttribute('content', color) return toggleLayout: (layout, enable) ->