1$(document).ready(function() { 2 /* Favorites */ 3 $('.favor').on('click', function(e) { 4 var favorID = $(this).attr('data-item'); 5 if($(this).hasClass('is-active')) 6 var doAction = 'delete'; 7 else 8 var doAction = 'add'; 9 10 addFavorite(favorID, doAction); 11 }); 12 /* Favorites */ 13 14 // ФÑнкÑÐ¸Ñ Ð´Ð»Ñ ÑÑÐµÐ½Ð¸Ñ ÐºÑки 15 function getCookie(name) { 16 const value = "; " + document.cookie; 17 const parts = value.split("; " + name + "="); 18 if (parts.length === 2) return parts.pop().split(";").shift(); 19 } 20 // ÐÑовеÑÑем, еÑÑÑ Ð»Ð¸ кÑка 21 if (!getCookie('coockcheck')) { 22 $('#gdpr-cookie-message').removeClass('_hide'); 23 } 24 $('.gdpr_cookie_btn').on('click', function (e) { 25 e.preventDefault(); 26 // ÐÑовеÑÑем, еÑÑÑ Ð»Ð¸ кÑка 27 if (!getCookie('coockcheck')) { 28 // УÑÑанавливаем ÑеÑÑионнÑÑ ÐºÑÐºÑ (без expires) 29 document.cookie = "coockcheck=1; path=/"; 30 $('#gdpr-cookie-message').addClass('_hide'); 31 } 32 }); 33}); 34/* ÐзбÑанное */ 35 function addFavorite(id, action) 36 { 37 var param = 'id='+id+"&action="+action; 38 $.ajax({
39 url: '/local/templates/redkot/ajax/favorites.php', // URL оÑпÑавки запÑоÑа 40 type: "GET", 41 dataType: "html", 42 data: param, 43 success: function(response) { // ÐÑли ÐаннÑе оÑпÑÐ°Ð²Ð»ÐµÐ½Ñ ÑÑпеÑно 44 var result = $.parseJSON(response); 45 if(result == 1){ // ÐÑли вÑÑ ÑÑÑко, Ñо вÑполнÑем дейÑÑвиÑ, коÑоÑÑе показÑваÑÑ, ÑÑо даннÑе оÑпÑÐ°Ð²Ð»ÐµÐ½Ñ 46 $('.favor[data-item="'+id+'"]').addClass('is-active'); 47 /*var wishCount = parseInt($('#want .col').html()) + 1; 48 $('#want .col').html(wishCount); // ÐизÑалÑно менÑем колиÑеÑÑво Ñ Ð¸ÐºÐ¾Ð½ÐºÐ¸*/ 49 } 50 if(result == 2){ 51 $('.favor[data-item="'+id+'"]').removeClass('is-active'); 52 /*var wishCount = parseInt($('#want .col').html()) - 1; 53 $('#want .col').html(wishCount); // ÐизÑалÑно менÑем колиÑеÑÑво Ñ Ð¸ÐºÐ¾Ð½ÐºÐ¸*/ 54 } 55 }, 56 error: function(jqXHR, textStatus, errorThrown){ // ÐÑибка 57 console.log('Error: '+ errorThrown); 58 } 59 }); 60 } 61/* ÐзбÑанное */ 62 63 64function onloadFunction() { 65 if (!window.smartCaptcha) return; 66 67 const captchaContainers = document.querySelectorAll('.captcha-container'); 68 69 captchaContainers.forEach((container) => { 70 const currentForm = container.closest('form'); 71 if (!currentForm) return; 72 73 const widgetId = window.smartCaptcha.render(container, { 74 sitekey: 'ysc1_2b4PVRbzDiNdUkgmFKaTvMGwWiHfTKAvMsmcJ8UO6571c6a4', 75 invisible: true, // ÐÐµÐ²Ð¸Ð´Ð¸Ð¼Ð°Ñ ÐºÐ°Ð¿Ñа 76 hideShield: true, 77 callback: (token) => { 78 let input = currentForm.querySelector('input[name="smart-token"]'); 79 if (!input) { 80 input = document.createElement('input'); 81 input.type = 'hidden'; 82 input.name = 'smart-token'; 83 currentForm.appendChild(input); 84 } 85 input.value = token; 86 87 currentForm.submit(); 88 } 89 }); 90 91 currentForm.addEventListener('submit', (e) => { 92 e.preventDefault(); 93 94 const submitBtn = currentForm.querySelector('[type="submit"]'); 95 if (submitBtn) submitBtn.disabled = true; 96 97 // ÐапÑÑкаем пÑовеÑÐºÑ ÐºÐ°Ð¿Ñи 98 window.smartCaptcha.execute(widgetId); 99 }); 100 }); 101}
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.