From 0791348e3bdc61cd804ff990b888afa215d30444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD?= Date: Sat, 19 Aug 2023 16:25:00 +0600 Subject: [PATCH] Update color.js --- static/js/color.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/static/js/color.js b/static/js/color.js index 5798439..c96a188 100644 --- a/static/js/color.js +++ b/static/js/color.js @@ -144,9 +144,8 @@ function getRandomColorName() { } function setRandomColor() { - const colorBox = document.querySelector('.color-box'); const randomColorName = getRandomColorName(); - colorBox.style.setProperty('--maincolor', randomColorName); + document.documentElement.style.setProperty('--main-color', randomColorName); } // Set random color on page load