1// UTM tracking â save params from URL to sessionStorage 2(function() { 3 var params = new URLSearchParams(window.location.search); 4 ["utm_source", "utm_campaign", "utm_medium", "utm_content", "utm_term"].forEach(function(p) { 5 if (params.get(p)) sessionStorage.setItem(p, params.get(p)); 6 }); 7})(); 8 9// Ðод вÑплÑваÑки cookie на ÑайÑе 10// ÑÑнкÑÐ¸Ñ Ð²Ð¾Ð·Ð²ÑаÑÐ°ÐµÑ cookie Ñ Ð¸Ð¼ÐµÐ½ÐµÐ¼ name, еÑли еÑÑÑ, еÑли неÑ, Ñо undefined 11function getCookie(name) { 12 let matches = document.cookie.match(new RegExp( 13 "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" 14 )); 15 return matches ? decodeURIComponent(matches[1]) : undefined; 16} 17let cookiecook = getCookie("cookiecook"), 18cookiewin = document.getElementsByClassName('cookie_notice')[0]; 19// пÑовеÑÑем, еÑÑÑ Ð»Ð¸ Ñ Ð½Ð°Ñ cookie, Ñ ÐºÐ¾ÑоÑой Ð¼Ñ Ð½Ðµ показÑваем окно и еÑли неÑ, запÑÑкаем показ 20if (cookiecook != "no") { 21 // показÑваем 22 cookiewin.style.display="block"; 23 // закÑÑваем по ÐºÐ»Ð¸ÐºÑ 24 document.getElementById("cookie_close").addEventListener("click", function(){ 25 cookiewin.style.display="none"; 26 // запиÑÑваем cookie на 1 денÑ, Ñ ÐºÐ¾ÑоÑой Ð¼Ñ Ð½Ðµ показÑваем окно 27 let date = new Date; 28 date.setDate(date.getDate() + 180); 29 document.cookie = "cookiecook=no; path=/; expires=" + date.toUTCString(); 30 }); 31} 32 33;(function () { 34 if (!('ontouchstart' in window)) return; 35 var sx = 0, sy = 0, st = 0, moved = false, tracking = false, pending = null, timer = null; 36 function clear() { if (timer) { clearTimeout(timer); timer = null; } pending = null; } 37 function onStart(e) { 38 if (e.touches && e.touches.length > 1) { tracking = false; return; } 39 var t = e.changedTouches[0]; 40 sx = t.clientX; sy = t.clientY; st = e.timeStamp; moved = false; tracking = true; 41 } 42 function onMove(e) { 43 if (!tracking) return; 44 var t = e.changedTouches[0]; 45 if (Math.abs(t.clientX - sx) > 8 || Math.abs(t.clientY - sy) > 8) moved = true; 46 } 47 function onEnd(e) { 48 if (!tracking) return; 49 tracking = false; 50 if (moved || e.timeStamp - st > 700) return; 51 if (!e.target || !e.target.closest) return; 52 var link = e.target.closest('a.carousel__item, .carousel__item a[href]'); 53 if (!link || !link.closest('.js-carousel')) return; 54 var href = link.getAttribute('href'); 55 if (!href || href.charAt(0) === '#') return; 56 clear(); 57 pending = { href: href, blank: link.getAttribute('target') === '_blank' }; 58 timer = setTimeout(function () { 59 var p = pending; clear(); 60 if (!p) return; 61 if (p.blank) window.open(p.href, '_blank'); else window.location.href = p.href; 62 }, 120); 63 } 64 function onClick() { clear(); } 65 document.addEventListener('touchstart', onStart, { passive: true }); 66 document.addEventListener('touchmove', onMove, { passive: true }); 67 document.addEventListener('touchend', onEnd, { passive: true }); 68 document.addEventListener('click', onClick, true); 69})();
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.