PageSourceSearch

https://grandlongwy.fr/agglo-en-scenes-2026/js/slider.js

js grandlongwy.fr collected 2026-10-02 19:26:01 UTC 888 bytes, 24 lines download raw bytes

1(function () {
2  var track = document.querySelector('.track');
3  if (!track) return;
4  var slides = track.children.length;
5  var dots = [].slice.call(document.querySelectorAll('.dot'));
6  var i = 0, timer;
7
8  function render() {
9    track.style.transform = 'translateX(' + (-i * 100) + '%)';
10    dots.forEach(function (d, n) { d.classList.toggle('is-active', n === i); });
11  }
12  function go(n, stop) {
13    i = (n + slides) % slides;
14    if (stop) clearInterval(timer);
15    render();
16  }
17  document.querySelector('[data-next]').addEventListener('click', function () { go(i + 1, true); });
18  document.querySelector('[data-prev]').addEventListener('click', function () { go(i - 1, true); });
19  dots.forEach(function (d) {
20    d.addEventListener('click', function () { go(parseInt(d.dataset.go, 10), true); });
21  });
22  timer = setInterval(function () { go(i + 1); }, 6000);
23  render();
24})();

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.