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.