From 6f28acf4aefb437ec7be0af2da9f95e389f18b9a Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 20 Sep 2022 20:58:20 +0200 Subject: [PATCH] fix last commit --- files/templates/comments.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/files/templates/comments.html b/files/templates/comments.html index 9939e7f78..b75e244d0 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -895,9 +895,8 @@ const detectionDiv = document.querySelector('#detection'); const isAutoDark = getComputedStyle(detectionDiv).backgroundColor != 'rgb(255, 255, 255)'; if (!isAutoDark) { - let element = document.getElementsByClassName('comment-section') + const element = document.getElementsByClassName('comment-section')[0] if (element) { - element = element[0]; let color = getComputedStyle(element).getPropertyValue('background-color'); color = 'rgba' + color.slice(3,-1) + ', 0.1)'