1 2var name_sity2; 3function createCookie(name, value, days) { 4var name_sity2 = value; 5 var expires; 6 7 if (days) { 8 var date = new Date(); 9 date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); 10 expires = "; expires=" + date.toGMTString(); 11 } else { 12 expires = ""; 13 } 14 document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/"; 15 jQuery.fancybox.close(); 16 //console.log(name_sity2); 17 jQuery('.name_addr').html(name_sity2); 18 jQuery('.geo_sity').html(name_sity2); 19 jQuery('#geolocal-mobile').hide(); 20} 21 22function getCookie(name) { 23 let matches = document.cookie.match(new RegExp( 24 "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)" 25 )); 26 return matches ? decodeURIComponent(matches[1]) : undefined; 27} 28 29 30 31 32 33 34 35 36 37var name_sity = getCookie("sity"); 38 39function clickSity(){ 40 41 /*jQuery.fancybox.close(); 42 //console.log(name_sity2); 43 jQuery('.name_addr').html(name_sity2); 44 jQuery('.geo_sity').html(name_sity2); 45 jQuery('#geolocal-mobile').hide();*/ 46 47} 48 49 50 51 52 53jQuery(document).ready(function() { 54 55 var cur_url = window.location.href; 56 57 if(typeof getCookie("kk_last_url") == 'undefined'){ 58 last_url = cur_url; 59 createCookie("kk_last_url", last_url,1 ); 60 createCookie("kk_cur_url", cur_url,1 ); 61 } 62 else{ 63 last_url = getCookie("kk_last_url"); 64 if(last_url==cur_url){ 65 // console.info('im back'); 66 } 67 else{ 68 createCookie("kk_last_url", document.referrer,1 ); 69 } 70 createCookie("kk_cur_url", cur_url,1 ); 71 } 72 73 // console.info(getCookie("kk_cur_url")); 74 // console.info(getCookie("kk_last_url")); 75 76 77 jQuery(window).on("scroll", function() { 78 if(cur_url == last_url){ 79 // Set a cookie that holds the scroll position. 80 createCookie("kk_last_scroll", jQuery(document).scrollTop(),1 ); 81 } 82 83 }); 84 // console.log ('done'); 85 86 87 88 89 90 if ( getCookie("kk_last_scroll") !== null && cur_url == last_url) { 91 jQuery(document).scrollTop( getCookie("kk_last_scroll") ); 92} 93 94 95 96 97 98 99 100if(getCookie("sity") != undefined){ 101 jQuery('.name_addr').html(name_sity); 102 jQuery('.geo_sity').html(name_sity); 103} 104else{ 105 jQuery('.name_addr').html('г. ÐоÑква'); 106 jQuery('.geo_sity').html('ÐоÑква'); 107} 108 109 110 111jQuery('.mobile_name_addr').click(function(){ 112 if (jQuery(window).scrollTop() > 50) { 113 jQuery(window).scrollTop(0); 114 } 115 jQuery('#geolocal-mobile').show(); 116}); 117 118 119jQuery('.mosk_and_obl').click(function(){ 120 jQuery(this).addClass('active'); 121 jQuery('.regions').removeClass('active'); 122 jQuery('.geo_cont_mosk').show(); 123 jQuery('.geo_cont_regions').hide(); 124 125}); 126jQuery('.regions').click(function(){ 127 jQuery(this).addClass('active'); 128 jQuery('.mosk_and_obl').removeClass('active'); 129 jQuery('.geo_cont_mosk').hide(); 130 jQuery('.geo_cont_regions').show(); 131 132}); 133 134 135 136 137}); 138 139 140 141 142
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.