1/** **************************************************************************** 2 * @copyright Copyright © 2024 Dmitriy Taranov. * 3 * * 4 * @file cookies.js * 5 * @author Anton Fedorov * 6 * @author Dmitriy Taranov <[email protected]> * 7 * @site https://xdemon.ru/inova * 8 ***************************************************************************** */ 9 10(() => { 11 const bannerText = ` 12 <h3>ÐÐ°Ñ ÑÐ°Ð¹Ñ ÑобиÑÐ°ÐµÑ cookie</h3> 13 <p> 14 ÐÑÐ¾Ñ Ð²ÐµÐ±-ÑÐ°Ð¹Ñ Ð¸ÑполÑзÑÐµÑ ÑÐ°Ð¹Ð»Ñ cookie, ÑÑÐ¾Ð±Ñ Ð¾Ð±ÐµÑпеÑиÑÑ ÑдобнÑÑ ÑабоÑÑ Ð¿Ð¾Ð»ÑзоваÑелей и ÑÑнкÑионалÑнÑе возможноÑÑи ÑайÑа. </p> 15<p> ÐÑÐ¾Ð´Ð¾Ð»Ð¶Ð°Ñ Ð¿Ð¾Ð»ÑзоваÑÑÑÑ ÑайÑом Ð²Ñ ÑоглаÑаеÑеÑÑ Ñ ÑÑловиÑми его иÑполÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸ ÑбоÑа Ñайлов cookie в ÑооÑвеÑÑÑвии Ñ 16 <a href="/terms" target="_blank">полиÑикой иÑполÑзованиÑ</a>. 17 </p> 18 `; 19 20 const buttonText = 'ÐонÑÑно'; 21 22 class CookieBanner { 23 constructor() { 24 this.localStorageKey = 'cookieAccepted'; 25 this.init(); 26 } 27 28 init() { 29 if (!localStorage.getItem(this.localStorageKey)) { 30 this.renderBanner(); 31 } 32 } 33 34 renderBanner() { 35 const banner = $(` 36 <div class="cookie-banner"> 37 <div class="cookie-banner-content"> 38 ${bannerText} 39 </div> 40 <button class="cookie-banner-close" aria-label="ÐакÑÑÑÑ">Ã</button> 41 <button class="cookie-banner-accept">${buttonText}</button> 42 </div> 43 `); 44 45 $('body').append(banner); 46 47 $('.cookie-banner-accept').on('click', () => this.acceptCookies()); 48 $('.cookie-banner-close').on('click', () => this.closeBanner()); 49 } 50 51 acceptCookies() { 52 localStorage.setItem(this.localStorageKey, 'true'); 53 this.removeBanner(); 54 } 55 56 closeBanner() { 57 this.removeBanner(); 58 } 59 60 removeBanner() { 61 $('.cookie-banner').remove(); 62 } 63 } 64 65 $(() => { 66 const domains = ['ipsen-edu.ru'] 67 if (domains.some(domain=>window.location.href.includes(domain))) { 68 new CookieBanner(); 69 } 70 }); 71})();
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.