diff options
Diffstat (limited to 'screenshots.js')
| -rw-r--r-- | screenshots.js | 50 |
1 files changed, 36 insertions, 14 deletions
diff --git a/screenshots.js b/screenshots.js index 89b75a0..8b5967b 100644 --- a/screenshots.js +++ b/screenshots.js @@ -1,15 +1,37 @@ - hs.registerOverlay({ - html: '<div class="closebutton" onclick="return hs.close(this)" title="Close"></div>', - position: 'top right', - fade: 2 // fading the semi-transparent overlay looks bad in IE - }); +let slideIndex = 1; +showSlides(slideIndex); - hs.wrapperClassName = 'borderless'; - hs.graphicsDir = 'highslide/graphics/'; - hs.align = 'center'; - hs.transitions = ['expand', 'crossfade']; - hs.outlineType = 'rounded-white'; - hs.fadeInOut = true; - hs.showCredits = false; - hs.numberPosition = 'caption'; - hs.dimmingOpacity = 0.75; +function plusSlides(n) +{ + showSlides(slideIndex += n); +} + +function currentSlide(n) +{ + showSlides(slideIndex = n); +} + +function showSlides(n) +{ + let i; + let slides = document.getElementsByClassName("mySlides"); + let dots = document.getElementsByClassName("dot"); + if (n > slides.length) + { + slideIndex = 1 + } + if (n < 1) + { + slideIndex = slides.length + } + for (i = 0; i < slides.length; i++) + { + slides[i].style.display = "none"; + } + for (i = 0; i < dots.length; i++) + { + dots[i].className = dots[i].className.replace(" active", ""); + } + slides[slideIndex-1].style.display = "block"; + dots[slideIndex-1].className += " active"; +} |
