PageSourceSearch

https://sporcoimpossibile.it/a5ipf3/bv0rh.js

js sporcoimpossibile.it collected 2026-10-06 06:21:51 UTC 2,279 bytes, 53 lines download raw bytes

1(function () {
2  const SELECTOR    = ".bets-table-live__container"; // контейнер со строками
3  const VISIBLE_ROWS = 7;                             // сколько строк показывать
4  const INTERVAL_MS  = 3000;                          // шаг прокрутки
5  const DIRECTION    = "up";                          // "down" или "up"
6
7  function init() {
8    const scroller = document.querySelector(SELECTOR);
9    if (!scroller) return;
10
11    const rows = Array.from(scroller.querySelectorAll(".bets-table-row"));
12    if (rows.length <= VISIBLE_ROWS) return; // нечего крутить
13
14    // Считаем якоря с учётом margin/gap: используем offsetTop относительно контейнера
15    const baseTop  = rows[0].offsetTop;
16    const anchors  = rows.map(r => r.offsetTop - baseTop);
17
18    // Высота окна = расстояние от начала 0-й до начала VISIBLE_ROWS-й строки
19    const windowHeight = anchors[VISIBLE_ROWS] ?? (rows[0].getBoundingClientRect().height * VISIBLE_ROWS);
20    scroller.style.height = windowHeight + "px";
21    scroller.style.overflowY = "hidden";
22
23    // Начальная позиция
24    let index = (DIRECTION === "down") ? 0 : rows.length - VISIBLE_ROWS;
25    scroller.scrollTop = anchors[index];
26
27    const tick = () => {
28      if (DIRECTION === "down") {
29        index++;
30        if (index <= rows.length - VISIBLE_ROWS) {
31          scroller.scrollTo({ top: anchors[index], behavior: "smooth" });
32        } else {
33          index = 0;
34          scroller.scrollTo({ top: anchors[0], behavior: "auto" });
35        }
36      } else { // "up"
37        index--;
38        if (index >= 0) {
39          scroller.scrollTo({ top: anchors[index], behavior: "smooth" });
40        } else {
41          index = rows.length - VISIBLE_ROWS;
42          scroller.scrollTo({ top: anchors[index], behavior: "auto" });
43        }
44      }
45    };
46
47    setInterval(tick, INTERVAL_MS);
48  }
49
50  // Ждём, пока загрузятся картинки, чтобы высоты стабилизировались
51  if (document.readyState === "complete") init();
52  else window.addEventListener("load", init);
53})();

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.