1document.addEventListener('DOMContentLoaded', function() { 2 // ФÑнкÑÐ¸Ñ Ð´Ð»Ñ ÑÑÑановки cookie 3 function setCookie(name, value, days) { 4 var expires = ''; 5 if (days) { 6 var date = new Date(); 7 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 8 expires = '; expires=' + date.toUTCString(); 9 } 10 document.cookie = name + '=' + (value || '') + expires + '; path=/'; 11 } 12 13 // ФÑнкÑÐ¸Ñ Ð´Ð»Ñ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ cookie 14 function getCookie(name) { 15 var nameEQ = name + '='; 16 var ca = document.cookie.split(';'); 17 for (var i = 0; i < ca.length; i++) { 18 var c = ca[i]; 19 while (c.charAt(0) === ' ') c = c.substring(1, c.length); 20 if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length); 21 } 22 return null; 23 } 24 25 // ÐÑовеÑÑем, бÑло ли Ñведомление пÑинÑÑо Ñанее 26 var cookieNoticeAccepted = getCookie('cookie_notice_accepted'); 27 var cookieNotice = document.getElementById('cookie-notice'); 28 29 if (!cookieNoticeAccepted && cookieNotice) { 30 // ÐоказÑваем Ñведомление Ñ Ð½ÐµÐ±Ð¾Ð»ÑÑой задеÑжкой 31 setTimeout(function() { 32 cookieNotice.classList.add('show'); 33 }, 1000); 34 35 // ÐбÑабоÑÑик нажаÑÐ¸Ñ Ð½Ð° ÐºÐ½Ð¾Ð¿ÐºÑ "ÐÑинÑÑÑ" 36 var acceptButton = document.getElementById('cookie-notice-accept'); 37 if (acceptButton) { 38 acceptButton.addEventListener('click', function() { 39 // УÑÑанавливаем cookie на 365 дней 40 setCookie('cookie_notice_accepted', 'true', 365); 41 42 // СкÑÑваем Ñведомление 43 cookieNotice.classList.remove('show'); 44 45 // ÐолноÑÑÑÑ ÑдалÑем ÑеÑез 500Ð¼Ñ Ð¿Ð¾Ñле анимаÑии 46 setTimeout(function() { 47 cookieNotice.style.display = 'none'; 48 }, 500); 49 }); 50 } 51 } 52});
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.