PageSourceSearch

https://vkusblagosti.ru/wp-content/plugins/bono-constructors/vb-blocks/assets/marquee.js

js vkusblagosti.ru collected 2026-10-05 00:04:05 UTC 1,351 bytes, 37 lines download raw bytes

1(function () {
2  function cloneGroup(track) {
3    const group = track.querySelector('[data-pma-group]');
4    if (!group) return;
5
6    const marquee = track.closest('.pma__marquee');
7    if (!marquee) return;
8
9    // Удаляем старые клоны, чтобы пересчитать количество
10    track.querySelectorAll('[data-pma-clone="1"]').forEach(function (el) { el.remove(); });
11
12    // Клонируем группу до тех пор, пока ширина трека не будет не меньше 2× ширины контейнера
13    // (для бесшовной анимации translate -50%)
14    var trackWidth = track.offsetWidth;
15    var containerWidth = marquee.offsetWidth;
16    var minTrackWidth = Math.max(containerWidth * 2, 2000);
17
18    while (trackWidth < minTrackWidth) {
19      var clone = group.cloneNode(true);
20      clone.setAttribute('aria-hidden', 'true');
21      clone.setAttribute('data-pma-clone', '1');
22      clone.querySelectorAll('img').forEach(function (img) { img.alt = ''; });
23      track.appendChild(clone);
24      trackWidth = track.offsetWidth;
25    }
26  }
27
28  function init() {
29    document.querySelectorAll('[data-pma-track]').forEach(cloneGroup);
30  }
31
32  if (document.readyState === 'loading') {
33    document.addEventListener('DOMContentLoaded', init);
34  } else {
35    init();
36  }
37})();

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.