From 1ba4213910758f1fb3e7620a64fecbb8a8ec3c39 Mon Sep 17 00:00:00 2001 From: Tom Hirschberger Date: Tue, 11 Jan 2022 15:54:45 +0100 Subject: [PATCH] set the hidden class by classList features instead of string manipulation now --- js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 816d021a..dfb79708 100644 --- a/js/main.js +++ b/js/main.js @@ -245,7 +245,7 @@ const MM = (function () { if (moduleWrapper !== null) { moduleWrapper.style.transition = "opacity " + speed / 1000 + "s"; moduleWrapper.style.opacity = 0; - moduleWrapper.className += " hidden"; + moduleWrapper.classList.add("hidden"); clearTimeout(module.showHideTimer); module.showHideTimer = setTimeout(function () { @@ -311,7 +311,7 @@ const MM = (function () { moduleWrapper.style.transition = "opacity " + speed / 1000 + "s"; // Restore the position. See hideModule() for more info. moduleWrapper.style.position = "static"; - moduleWrapper.className = moduleWrapper.className.split(" hidden").join(""); + moduleWrapper.classList.remove("hidden"); updateWrapperStates();