MCPcopy Create free account
hub / github.com/breck7/scroll / constructor

Method constructor

external/.slideshow.js:2–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1class SlideShow {
2 constructor() {
3 const hash = window.location.hash.replace("#", "")
4 this.page = hash === "" ? 1 : parseInt(hash)
5 window.location.hash = "#" + this.page
6 this.listenToKeyboard()
7 this.listenToHash()
8 this.renderAll()
9 }
10
11 renderSlide() {
12 jQuery(this.slides[this.page - 1]).show()

Callers

nothing calls this directly

Calls 4

listenToKeyboardMethod · 0.95
listenToHashMethod · 0.95
renderAllMethod · 0.95
replaceMethod · 0.80

Tested by

no test coverage detected