set the hidden class by classList features instead of string manipulation now

This commit is contained in:
Tom Hirschberger 2022-01-11 15:54:45 +01:00
parent 6c63fac240
commit 1ba4213910

View File

@ -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();