window.slidesk.launchHugo = () => {
  const checkStepConditions = () =>
    [...window.slidesk.slides[window.slidesk.currentSlide].classList].includes(
      "hugo-delire",
    ) && document.getElementById("hugo-script") === null;
  if (checkStepConditions()) {
    const d = document.createElement("script");
    d.id = "hugo-script";
    d.src = "./plugins/hugo/cyxx/hugo.min.js";
    document.body.appendChild(d);
    function onPlayPressed() {
      var playing = Module["toggleGame"]();
      playButton.value = playing ? "Pause" : "Play";
    }
    window.addEventListener("keydown", (ev) => {
      Module.onKeyDown(ev);
    });
    window.addEventListener("mousedown", (ev) => {
      Module.onMouseDown(ev);
    });
  }
};
