t.classList.add("hidden");
      canvasContainerElement.classList.add("hidden");
    };

    window.addEventListener("fullscreenchange", (event) => {
      if (!resizeCanvasCheckbox.checked) {
        return;
      }

      let classNamesToRemove = [];
      canvasElement.classList.forEach((value, key, listObj) => {
        if (value.match(/[w|h]-[[0-9]+px]/)) {
          classNamesToRemove.push(value);
        }
      });
      for (let className of classNamesToRemove) {
        canvasElement.classList.rem