PageSourceSearch

https://secrettolifeinstitute.com/blog/js/slider.js?v=626

js secrettolifeinstitute.com collected 2026-10-07 10:56:19 UTC 1,966 bytes, 71 lines download raw bytes

1var slideIndex = 1;
2
3var myTimer;
4
5var slideshowContainer;
6
7
8showSlides(slideIndex);
9myTimer = setInterval(function () { plusSlides(1) }, 4000);
10
11pause = () => {
12  clearInterval(myTimer);
13}
14
15resume = () => {
16  clearInterval(myTimer);
17  myTimer = setInterval(function () { plusSlides(slideIndex) }, 4000);
18}
19//COMMENT OUT THE LINE BELOW TO KEEP ARROWS PART OF MOUSEENTER PAUSE/RESUME
20//  slideshowContainer = document.getElementsByClassName('slideshow-inner')[0];
21
22//UNCOMMENT OUT THE LINE BELOW TO KEEP ARROWS PART OF MOUSEENTER PAUSE/RESUME
23slideshowContainer = document.getElementsByClassName('slideshow-container')[0];
24
25slideshowContainer.addEventListener('mouseenter', pause)
26slideshowContainer.addEventListener('mouseleave', resume)
27
28
29// NEXT AND PREVIOUS CONTROL
30function plusSlides(n) {
31  clearInterval(myTimer);
32  if (n < 0) {
33    showSlides(slideIndex -= 1);
34  } else {
35    showSlides(slideIndex += 1);
36  }
37
38  //COMMENT OUT THE LINES BELOW TO KEEP ARROWS PART OF MOUSEENTER PAUSE/RESUME
39
40  if (n === -1) {
41    myTimer = setInterval(function () { plusSlides(n + 2) }, 4000);
42  } else {
43    myTimer = setInterval(function () { plusSlides(n + 1) }, 4000);
44  }
45}
46
47//Controls the current slide and resets interval if needed
48function currentSlide(n) {
49  clearInterval(myTimer);
50  myTimer = setInterval(function () { plusSlides(n + 1) }, 4000);
51  showSlides(slideIndex = n);
52}
53
54function showSlides(n) {
55  var i;
56  var slides = document.getElementsByClassName("mySlides");
57
58  // var dots = document.getElementsByClassName("dot");
59  if (n > slides.length) { slideIndex = 1 }
60  if (n < 1) { slideIndex = slides.length }
61  for (i = 0; i < slides.length; i++) {
62    slides[i].style.display = "none";
63  }
64  // for (i = 0; i < dots.length; i++) {
65  //     dots[i].className = dots[i].className.replace(" active", "");
66  // }
67  if(slides && slides[slideIndex - 1]) {
68    slides[slideIndex - 1].style.display = "block";
69  }
70  //dots[slideIndex-1].className += " active";
71}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.