~ihabunek/vampires

ae3af2eaa077ed5bce1bc0c1029eb4662b4beb32 — Ivan Habunek 7 months ago af64db1
Fix off-by-one
1 files changed, 2 insertions(+), 2 deletions(-)

M index.html
M index.html => index.html +2 -2
@@ 127,7 127,7 @@
        return slideTimestamp > timestamp
      })

      return index == -1 ? slideTimings.length - 1 : index
      return index == -1 ? slideTimings.length - 1 : index - 1
    }

    const slide = document.getElementById("slide")


@@ 137,7 137,7 @@
      const index = getSlide(event.target.currentTime)
      const src = index < 10 ? `slides/slide_0${index}.jpg` : `slides/slide_${index}.jpg`
      slide.src = src
      current.innerText = index
      current.innerText = index + 1
    });
  </script>
</html>