1window.yaContextCb = window.yaContextCb || []; 2 3window.yaContextCb.push(() => { 4 Ya.Context.AdvManager.render({ 5 blockId: "R-A-5609069-27", 6 renderTo: "yandex_rtb_R-A-5609069-27" 7 }); 8}); 9 10document.addEventListener('DOMContentLoaded', () => { 11 const nav = document.querySelector('.nav-lnk'); 12 const left = document.querySelector('.menu-arrow.left'); 13 const right = document.querySelector('.menu-arrow.right'); 14 15 if (!nav) return; 16 17 function updateArrows() { 18 const scrollLeft = nav.scrollLeft; 19 const maxScroll = nav.scrollWidth - nav.clientWidth; 20 21 right.style.display = scrollLeft < maxScroll - 5 ? 'block' : 'none'; 22 23 left.style.display = scrollLeft > 5 ? 'block' : 'none'; 24 } 25 26 right.addEventListener('click', () => { 27 nav.scrollBy({ left: 150, behavior: 'smooth' }); 28 }); 29 30 left.addEventListener('click', () => { 31 nav.scrollBy({ left: -150, behavior: 'smooth' }); 32 }); 33 34 nav.addEventListener('scroll', updateArrows); 35 window.addEventListener('resize', updateArrows); 36 37 updateArrows(); 38}); 39 40const burger = document.getElementById('burger'); 41const menu = document.getElementById('sideMenu'); 42const overlay = document.getElementById('overlay'); 43 44burger.addEventListener('click', () => { 45 menu.classList.toggle('open'); 46 overlay.classList.toggle('active'); 47}); 48overlay.addEventListener('click', () => { 49 menu.classList.remove('open'); 50 overlay.classList.remove('active'); 51}); 52 53document.querySelectorAll('.has-submenu > a').forEach(link => { 54 link.addEventListener('click', function(e) { 55 e.preventDefault(); 56 57 const parent = this.parentElement; 58 const submenu = this.nextElementSibling; 59 60 parent.classList.toggle('active'); 61 62 if (submenu.style.display === 'block') { 63 submenu.style.display = 'none'; 64 } else { 65 submenu.style.display = 'block'; 66 } 67 }); 68}); 69 70const newsList = document.querySelector('.news-list'); 71if (newsList) { 72 function checkScroll() { 73 if (newsList.scrollHeight > newsList.clientHeight) { 74 newsList.classList.add('scrollable'); 75 } else { 76 newsList.classList.remove('scrollable'); 77 } 78 } 79 checkScroll(); 80 window.addEventListener('resize', checkScroll); 81} 82 83document.addEventListener("DOMContentLoaded", function () { 84 const searchBox = document.querySelector(".search-box"); 85 const btn = searchBox.querySelector("button"); 86 const popup = searchBox.querySelector(".search-popup"); 87 const close = searchBox.querySelector(".search-close"); 88 89 function focusSearch() { 90 const input = popup.querySelector("input[type='text']"); 91 if (input) input.focus(); 92 else setTimeout(focusSearch, 100); 93 } 94 95 btn.addEventListener("click", function (e) { 96 e.preventDefault(); 97 popup.classList.toggle("active"); 98 99 if (popup.classList.contains("active")) { 100 focusSearch(); 101 } 102 }); 103 104 close.addEventListener("click", function () { 105 popup.classList.remove("active"); 106 }); 107 108 document.addEventListener("click", function (e) { 109 if (!searchBox.contains(e.target)) { 110 popup.classList.remove("active"); 111 } 112 }); 113}); 114 115document.addEventListener('DOMContentLoaded', () => { 116 const slider = document.querySelector('.program-slider-container'); 117 const prevBtn = document.querySelector('.slider-arrow.prev'); 118 const nextBtn = document.querySelector('.slider-arrow.next'); 119 120 if (!slider) return; 121 122 const slideWidth = slider.querySelector('.program-slide')?.offsetWidth + 20 || 260; 123 124 prevBtn?.addEventListener('click', () => { 125 slider.scrollBy({ left: -slideWidth * 2, behavior: 'smooth' }); 126 }); 127 128 nextBtn?.addEventListener('click', () => { 129 slider.scrollBy({ left: slideWidth * 2, behavior: 'smooth' }); 130 }); 131 132 let isDown = false; 133 let isDragging = false; 134 let startX = 0; 135 let startScroll = 0; 136 137 slider.addEventListener('mousedown', (e) => { 138 if (e.button !== 0) return; 139 140 isDown = true; 141 isDragging = false; 142 startX = e.clientX; 143 startScroll = slider.scrollLeft; 144 145 slider.classList.add('dragging'); 146 }); 147 148 document.addEventListener('mousemove', (e) => { 149 if (!isDown) return; 150 151 const dx = e.clientX - startX; 152 153 if (Math.abs(dx) > 5) { 154 isDragging = true; 155 } 156 157 if (isDragging) { 158 e.preventDefault(); 159 slider.scrollLeft = startScroll - dx; 160 } 161 }); 162 163 document.addEventListener('mouseup', () => { 164 isDown = false;
165 slider.classList.remove('dragging'); 166 }); 167 168 slider.querySelectorAll('a').forEach(link => { 169 link.addEventListener('click', (e) => { 170 if (isDragging) { 171 e.preventDefault(); 172 } 173 }); 174 }); 175 176 slider.querySelectorAll('img').forEach(img => { 177 img.addEventListener('dragstart', (e) => e.preventDefault()); 178 }); 179}); 180 181/* */ 182 183(function () { 184 function initAd() { 185 setTimeout(() => { 186 (window.yaContextCb = window.yaContextCb || []).push(() => { 187 Ya.Context.AdvManager.render({ 188 blockId: "R-A-5609069-4", 189 type: "floorAd", 190 platform: "touch" 191 }); 192 }); 193 }, 10000); 194 } 195 196 if (document.readyState === 'complete') { 197 initAd(); 198 } else { 199 window.addEventListener('load', initAd); 200 } 201})(); 202 203let cseLoaded = false; 204 205function loadCSE() { 206 if (cseLoaded) return; 207 208 const script = document.createElement('script'); 209 script.src = "https://cse.google.com/cse.js?cx=63e8d9c0ca4674a4c"; 210 script.async = true; 211 document.body.appendChild(script); 212 213 cseLoaded = true; 214} 215 216document.addEventListener('DOMContentLoaded', () => { 217 const searchBtn = document.querySelector('.search-box button'); 218 const searchPopup = document.querySelector('.search-popup'); 219 220 if (!searchBtn || !searchPopup) return; 221 222 searchBtn.addEventListener('click', () => { 223 loadCSE(); 224 }, { once: true }); 225 226 searchPopup.addEventListener('click', () => { 227 loadCSE(); 228 }, { once: true }); 229}); 230 231document.addEventListener('DOMContentLoaded', () => { 232 if (window.innerWidth > 480) return; const nav = document.getElementById('mobileNav'); 233 const target = document.querySelector('h2.block-title'); if (!nav) return; let lastScroll = 0; let forcedVisible = false; 234 function showNav() { nav.classList.remove('nav-hidden'); } function hideNav() 235 { nav.classList.add('nav-hidden'); } window.addEventListener('scroll', () => { const currentScroll = window.pageYOffset; 236 if (target) { const rect = target.getBoundingClientRect(); forcedVisible = rect.top <= window.innerHeight * 0.6; } 237 if (forcedVisible) { showNav(); lastScroll = currentScroll; return; } if (currentScroll > lastScroll && currentScroll > 100) 238 { hideNav(); } else { showNav(); } lastScroll = currentScroll; }); }); 239 240document.addEventListener('DOMContentLoaded', function() {const videoElements = document.querySelectorAll('.video-box iframe'); videoElements.forEach(iframe => {const width = parseInt(iframe.getAttribute('width'));const height = parseInt(iframe.getAttribute('height'));if (height > width) {iframe.classList.add('vertical-video');}});});
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.