1function UserScripts(options) 2{ 3 var $this = this; 4 5 this.settings = { 6 domains: {}, 7 poorv:{ 8 active: false, 9 loaded: false, 10 css: '', 11 font:0, 12 color:0, 13 images:0, 14 kerning:0, 15 interval:0 16 } 17 }; 18 19 $.extend(this.settings,options); 20 21 //СкÑолл веÑÑ Ð½ÐµÐ¹ ÑÑÑоки Ð¼ÐµÐ½Ñ 22 var nav = $('#nav'); 23 var fixed = false; 24 // ÐовÑй год 25 var ny = $('body').hasClass('ny'); 26 27 //Sticky 28 var a = document.querySelector('.sticky-scroll'), b = null, K = null, Z = 0, P = 147, N = 20; 29 // еÑли Ñ P Ð½Ð¾Ð»Ñ Ð·Ð°Ð¼ÐµÐ½Ð¸ÑÑ Ð½Ð° ÑиÑло, Ñо блок бÑÐ´ÐµÑ Ð¿ÑилипаÑÑ Ð´Ð¾ Ñого, как веÑÑ Ð½Ð¸Ð¹ кÑай окна бÑаÑзеÑа дойдÑÑ Ð´Ð¾ веÑÑ Ð½ÐµÐ³Ð¾ кÑÐ°Ñ ÑлеменÑа, еÑли Ñ N â нижний кÑай дойдÑÑ Ð´Ð¾ нижнего кÑÐ°Ñ ÑлеменÑа. ÐÐ¾Ð¶ÐµÑ Ð±ÑÑÑ Ð¾ÑÑиÑаÑелÑнÑм ÑиÑлом 30 31 if (a) { 32 window.addEventListener('scroll', Ascroll, false); 33 document.body.addEventListener('scroll', Ascroll, false); 34 35 function Ascroll() { 36 var Ra = a.getBoundingClientRect(), 37 R1bottom = document.querySelector('.sticky-main').getBoundingClientRect().bottom; 38 if (Ra.bottom < R1bottom) { 39 if (b == null) { 40 var Sa = getComputedStyle(a, ''), s = ''; 41 for (var i = 0; i < Sa.length; i++) { 42 if (Sa[i].indexOf('overflow') == 0 || Sa[i].indexOf('padding') == 0 || Sa[i].indexOf('border') == 0 || Sa[i].indexOf('outline') == 0 || Sa[i].indexOf('box-shadow') == 0 || Sa[i].indexOf('background') == 0) { 43 s += Sa[i] + ': ' +Sa.getPropertyValue(Sa[i]) + '; ' 44 } 45 } 46 b = document.createElement('div'); 47 b.className = 'stop'; 48 b.style.cssText = s + ' box-sizing: border-box; width: ' + a.offsetWidth + 'px;'; 49 a.insertBefore(b, a.firstChild); 50 var l = a.childNodes.length; 51 for (var i = 1; i < l; i++) { 52 b.appendChild(a.childNodes[1]); 53 } 54 a.style.height = b.getBoundingClientRect().height + 'px'; 55 a.style.padding = '0'; 56 a.style.border = '0'; 57 } 58 var Rb = b.getBoundingClientRect(), 59 Rh = Ra.top + Rb.height, 60 W = document.documentElement.clientHeight, 61 R1 = Math.round(Rh - R1bottom), 62 R2 = Math.round(Rh - W); 63 if (Rb.height > W) { 64 if (Ra.top < K) { // ÑкÑолл вниз 65 if (R2 + N > R1) { // не дойÑи до низа 66 if (Rb.bottom - W + N <= 0) { // подÑепиÑÑÑÑ 67 b.className = 'sticky'; 68 b.style.top = W - Rb.height - N + 'px'; 69 Z = N + Ra.top + Rb.height - W; 70 } else { 71 b.className = 'stop'; 72 b.style.top = - Z + 'px'; 73 } 74 } else { 75 b.className = 'stop'; 76 b.style.top = - R1 +'px'; 77 Z = R1; 78 } 79 } else { // ÑкÑолл ввеÑÑ 80 if (Ra.top - P < 0) { // не дойÑи до веÑÑ Ð° 81 if (Rb.top - P >= 0) { // подÑепиÑÑÑÑ 82 b.className = 'sticky'; 83 b.style.top = P + 'px'; 84 Z = Ra.top - P; 85 } else { 86 b.className = 'stop'; 87 b.style.top = - Z + 'px'; 88 } 89 } else { 90 b.className = ''; 91 b.style.top = ''; 92 Z = 0; 93 } 94 } 95 K = Ra.top; 96 } else { 97 if ((Ra.top - P) <= 0) { 98 if ((Ra.top - P) <= R1) { 99 b.className = 'stop'; 100 b.style.top = - R1 +'px'; 101 } else { 102 b.className = 'sticky'; 103 b.style.top = P + 'px'; 104 } 105 } else { 106 b.className = ''; 107 b.style.top = ''; 108 } 109 } 110 window.addEventListener('resize', function() { 111 a.children[0].style.width = getComputedStyle(a, '').width 112 }, false); 113 } 114 } 115 } 116 117 function check_fix() { 118 var scrolled = window.pageYOffset || document.documentElement.scrollTop; 119 120 var navbar_open = $('#navbar.navbar-collapse').hasClass('in'); 121 122 if (scrolled>45 && !fixed && !navbar_open) { 123 nav.addClass('fix'); 124 $('body > .button-up').addClass('fix'); 125 fixed = true; 126 P = 122; 127 if ($(window).width() < '760'){ 128 $('.header-info').hide(); 129 // $('body > .header-info').height(105); 130 } 131 if(ny){ 132 $('body.ny > .ny-wrap').addClass('ny-fix'); 133 } 134 } 135 else if (scrolled<=45 && fixed) { 136 nav.removeClass('fix'); 137 $('body > .button-up').removeClass('fix'); 138 fixed = false; 139 P = 147; 140 // $('body > .header-info').height(151); 141 $('.header-info').show(); 142 if(ny){ 143 $('body.ny > .ny-wrap').removeClass('ny-fix'); 144 } 145 } 146 147 } 148 149 check_fix(); 150 window.onscroll = check_fix; 151 152 $('.button-up').click( function(){ 153 $("html, body").animate({ scrollTop: 0 }, {}); 154 // option - {duration: 1000, easing: 'easeInOutQuart'} easing: 'easeInOutQuart' - the option causes an error! 155 return false; 156 }); 157 158 //ÐоиÑк 159 $('.a-search').click( function(){ 160 $('.menu').css('display', 'none'); 161 $('.nav-search').css('display', 'none'); 162 $('.menu-search').css('display', 'block').animate({opacity: 1}, 250, function(){ 163 $('.menu-search input').focus(); 164 }); 165 return false; 166 }); 167 $('.a-search-cancel').click( function(){ 168 $('.menu-search').animate({opacity: 0}, 250, function(){ 169 $('.menu-search').css('display', 'none'); 170 $('.menu').css('display', 'block'); 171 $('.nav-search').css('display', 'block'); 172 }); 173 return false; 174 }); 175 176 //ÐпÑÐ¾Ñ 177 $('.vote-result').each( function(i, vote){ 178 drawVote(vote); 179 }); 180 181 //полиÑика конÑиденÑиалÑноÑÑи 182 $('body').on('click', '.show-politics', function(e){
183 e.preventDefault(); 184 185 var pmodal = new dkmodal({ 186 width: '800px' 187 }); 188 189 pmodal.form({ 190 title:'СоглаÑие на обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ Ð´Ð°Ð½Ð½ÑÑ ', 191 url:'/site/politics', 192 buttons:[{ 193 type:'dismiss', 194 caption:'ÐакÑÑÑÑ' 195 }] 196 }); 197 }); 198 199 //подпиÑка Ñ Ð¸Ð½Ð¿ÑÑа 200 $('#subscribe-input-group').on('click', '.subscribe-button', function(e){ 201 e.preventDefault(); 202 $this.subscribeDoSub( $('#subscribe-input-group') ); 203 }) 204 .on('keyup', 'input', function(e){ 205 $('.error', $(this).parent()).css('display','none'); 206 if(e.which==13){ 207 $this.subscribeDoSub( $('#subscribe-input-group') ); 208 } 209 }); 210 211 function drawVote( $parent ) 212 { 213 var ctx = $(".chart", $parent).get(0).getContext("2d"); 214 var data = new Array(); 215 /*Chart.defaults.global.tooltipFontSize = 11; 216 Chart.defaults.global.tooltipCaretSize = 0;*/ 217 $('.vote-data li', $parent).each( function(index){ 218 var obj = {}; 219 var item = $(this); 220 obj.value = item.data('value'); 221 obj.color = item.data('color'); 222 obj.label = item.data('text'); 223 obj.highlight = darkerColor(item.data('color'),0.05); 224 data.push(obj); 225 }); 226 var myDoughnutChart = new Chart(ctx).Doughnut(data,{ 227 tooltipFontSize: 12, 228 tooltipTemplate: "<%=label%>" 229 }); 230 } 231 232 $('.do-vote').click( function(){ 233 var id = $(this).data('id'); 234 var vote = $('#idvote_'+id); 235 var url = $(this).attr('href'); 236 var view = $(this).data('view'); 237 var type = $(this).data('type'); 238 var res=[]; 239 //var res = $('input[type=checkbox]:checked', vote).val(); 240 $('input[type='+type+']:checked', vote).each(function(){ 241 res.push($(this).val()); 242 }); 243 244 if (res.length) { 245 $.ajax({ 246 url: url, 247 method: 'POST', 248 data: {aw: res, _csrf: $('meta[name="csrf-token"]').attr("content"), view: view}, 249 dataType:'html', 250 cache:false 251 }).done( 252 function(result,textStatus){ 253 vote.animate({opacity:0}
253,250,function(){ 254 vote.html(result); 255 vote.animate({opacity:1},250, function(){ 256 drawVote(vote); 257 }); 258 }); 259 } 260 ).fail( 261 function(){ 262 alert('Ðе ÑдалоÑÑ Ð¿ÑоголоÑоваÑÑ!'); 263 } 264 ); 265 } 266 return false; 267 }); 268 269 //Ðидео youtube 270 if(typeof $.fancybox == 'function') { 271 $('.youtube-video').fancybox({ 272 maxWidth : 800, 273 maxHeight : 600, 274 fitToView : false, 275 width : '70%', 276 height : '70%', 277 autoSize : false, 278 closeClick : false, 279 openEffect : 'none', 280 closeEffect : 'none', 281 padding: 0 282 }); 283 284 //fancybox links 285 $("a.zoom").fancybox({ 286 openEffect : 'elastic', 287 closeEffect : 'elastic', 288 helpers : { 289 title : { 290 type : 'inside' 291 }, 292 } 293 }); 294 } 295 296 //РиÑÑнки в ÑекÑÑе 297 $('img.wide').each( function(i, item){ 298 if ($(item).attr('title') && $(item).attr('title').trim()!='') { 299 $(item).after('<div style="width:100%" class="img-title">' + $(item).attr('title') +'</div>'); 300 } 301 }); 302 303 //ÐоÑодÑкие обÑекÑÑ 304 var head_city_timer; 305 306 var CityObjects = [ 307 { 308 image: 'arh_most.jpg', 309 title: 'ÐÑÑ Ð°Ð½Ð³ÐµÐ»ÑÑкий моÑÑ', 310 text: 'ÐоÑÑ Ð¿Ð¾ÑÑÑоили за ÑÑÑÑÑÑ Ð´Ð½ÐµÐ¹. Ðго длина â 1132 меÑÑа, вÑÑоÑа â 119. Ðа моÑÑÑ ÑеÑÑÑ Ð¿Ð¾Ð»Ð¾Ñ Ð¿Ð¾ 4,5 меÑÑа каждаÑ. ÐÐ»Ñ Ð¿Ð¾Ð´ÑвеÑки ÑооÑÑÐ¶ÐµÐ½Ð¸Ñ ÑÑÑановили 2988 ÑвеÑилÑников.' 311 }, 312 { 313 image: 'ledovy.jpg', 314 title: 'ÐедовÑй двоÑеÑ', 315 text: 'ÐÑÑпнейÑÐ°Ñ Ð¿Ð»Ð¾Ñадка облаÑÑи на 5685 зÑиÑелей. Ðо двоÑÑе пÑÐ¾Ñ Ð¾Ð´ÑÑ Ð¸Ð³ÑÑ ÑемпионаÑа ÐÐ¥Ð, ледовÑе ÑÐ¾Ñ Ð¸ конÑеÑÑÑ, в Ñом ÑиÑле ежегоднÑй Ñок-ÑеÑÑÐ¸Ð²Ð°Ð»Ñ Â«ÐÑÐµÐ¼Ñ ÐºÐ¾Ð»Ð¾ÐºÐ¾Ð»ÑÑиков» памÑÑи ÐаÑлаÑÑва.' 316 }, 317 { 318 image: 'galskie.jpg', 319 title: 'ÐÑзей «УÑадÑба ÐалÑÑÐºÐ¸Ñ Â»', 320 text: 'ÐдинÑÑÐ²ÐµÐ½Ð½Ð°Ñ Ð² облаÑÑи полноÑÑÑÑ ÑÐ¾Ñ ÑанивÑаÑÑÑ Ð´Ð²Ð¾ÑÑнÑÐºÐ°Ñ ÑÑадÑба XIX века. ÐалÑÑкие бÑли в ÑодÑÑве Ñ Ð¢ÑÑгеневÑми и ТолÑÑÑми. УÑадÑба â ÑÑо «живой» мÑзей Ñ Ð¸Ð½ÑеÑакÑивнÑми ÑкÑкÑÑÑиÑми и пÑогÑаммами.' 321 }, 322 { 323 image: 'most.jpg', 324 title: 'ÐкÑÑбÑÑÑкий моÑÑ', 325 text: 'ÐлавнÑй Ñимвол ЧеÑеповÑа. ÐÑÐ¾ÐµÐ·Ð¶Ð°Ñ ÑаÑÑÑ Ð¼Ð¾ÑÑа подвеÑена на ванÑÐ°Ñ , неÑÑÑÑÑ Ð¿Ð¾Ð´Ð´ÐµÑживаÑÑ Ð¿Ð¸Ð»Ð¾Ð½Ñ. ÐÑÑоÑа главного пилона â 84 меÑÑа, ÑилÑÑÑ ÐµÐ³Ð¾ Ð½Ð°Ð¿Ð¾Ð¼Ð¸Ð½Ð°ÐµÑ Ð±ÑÐºÐ²Ñ Ð. Ðлина моÑÑа â 800 меÑÑов.' 326 }, 327 { 328 image: 'chram.jpg', 329 title: 'Ð¥Ñам РождеÑÑва Ð¥ÑиÑÑова', 330 text: 'ÐоÑÑоздан по обÑÐ°Ð·Ñ ÑÑÑеÑÑвовавÑей на ÑÑом меÑÑе ÑеÑкви РождеÑÑва Ð¥ÑиÑÑова, поÑÑÑоенной в 1789 Ð³Ð¾Ð´Ñ Ð¸ ÑазÑÑÑенной в 1932-м. Ð Ñ Ñаме Ñ ÑаниÑÑÑ ÑаÑÑиÑа манÑии СеÑаÑима СаÑовÑкого.' 331 }, 332 { 333 image: 'dm.jpg', 334 title: 'ÐвоÑÐµÑ Ð¼ÐµÑаллÑÑгов', 335 text: 'ÐÑÑпнейÑее кÑлÑÑÑÑное ÑÑÑеждение облаÑÑи. ÐнÑеÑÑеÑÑ Ð¾ÑÐ´ÐµÐ»Ð°Ð½Ñ Ð¼ÑамоÑом, Ñойе ÑкÑаÑаÑÑ Ð»ÑÑÑÑÑ Ð¸Ð· Ñ ÑÑÑÑалÑ, ÑÑилизованнÑе под ÑÑаÑиннÑе ÑÐ°Ñ ÑеÑÑкие лампÑ. ÐолÑÑой зал вмеÑÐ°ÐµÑ 1000 зÑиÑелей.' 336 }, 337 { 338 image: 'almaz.jpg', 339 title: 'СпоÑÑивно-конÑеÑÑнÑй зал «Ðлмаз»', 340 text: 'ÐеÑÐ²Ð°Ñ ÐºÑÑÑÐ°Ñ Ð¿Ð»Ð¾Ñадка Ñ Ð¸ÑкÑÑÑÑвеннÑм лÑдом в облаÑÑи, оÑкÑÑÑа в 1970 годÑ. Р«Ðлмазе» пÑÐ¾Ñ Ð¾Ð´ÑÑ Ð´ÐµÑÑкие и лÑбиÑелÑÑкие Ñ Ð¾ÐºÐºÐµÐ¹Ð½Ñе ÑÑÑниÑÑ. Ðаза одноименной Ñ Ð¾ÐºÐºÐµÐ¹Ð½Ð¾Ð¹ командÑ.' 341 }, 342 { 343 image: 'vereschagin.jpg', 344 title: 'ÐÑÑÑ ÐаÑÐ¸Ð»Ð¸Ñ ÐеÑеÑагина', 345 text: 'УÑÑановлен в 1957 Ð³Ð¾Ð´Ñ Ð½Ð° ÑлиÑе имени Ñ Ñдожника. Ðа поÑÑаменÑе изобÑажена палиÑÑа, обÑÐ°Ð¼Ð»ÐµÐ½Ð½Ð°Ñ Ð»Ð°Ð²ÑовÑм венком и киÑÑÑми знамен. ÐадпиÑÑ Ð³Ð»Ð°ÑиÑ: «ÐамеÑаÑелÑÐ½Ð¾Ð¼Ñ ÑÑÑÑÐºÐ¾Ð¼Ñ Ñ ÑдожникÑ-баÑалиÑÑÑ».' 346 }, 347 { 348 image: 'af.jpg', 349 title: 'ÐамÑÑник ÐÑанаÑÐ¸Ñ Ð¸ ФеодоÑÐ¸Ñ Ð§ÐµÑеповеÑким', 350 text: 'УÑÑановлен Ñ Ð¿Ð¾Ð´Ð½Ð¾Ð¶Ð¸Ñ Ð¡Ð¾Ð±Ð¾Ñной гоÑки. ÐÑанаÑий и ФеодоÑий â ÑÑеники СеÑÐ³Ð¸Ñ Ð Ð°Ð´Ð¾Ð½ÐµÐ¶Ñкого, оÑноваÑели ÐоÑкÑеÑенÑкого монаÑÑÑÑÑ, поÑиÑаÑÑÑÑ ÐºÐ°Ðº покÑовиÑели ЧеÑеповÑа.' 351 }, 352 { 353 image: 'sobor.jpg', 354 title: 'Ð¡Ð¾Ð±Ð¾Ñ ÐоÑкÑеÑÐµÐ½Ð¸Ñ Ð¥ÑиÑÑова', 355 text: 'СÑаÑейÑее каменное здание ЧеÑеповÑа. ÐÑ Ð¾Ð´Ð¸Ð» в подвоÑÑе ÐоÑкÑеÑенÑкого монаÑÑÑÑÑ, оÑнованного в 1362 годÑ. ÐоÑле ÑеволÑÑии ÑÐ¾Ð±Ð¾Ñ Ð±Ñл закÑÑÑ. Ð ÐЦ возвÑаÑен в 1946 годÑ.' 356 }, 357 { 358 image: 'milutin.jpg', 359 title: 'ÐамÑÑник ÐилÑÑинÑ', 360 text: 'Ðван ÐилÑÑин поÑÑи полвека ÑÑководил гоÑодом. Ðго ÑÑаÑаниÑми ÑезднÑй гоÑод пÑевÑаÑилÑÑ Ð² ÑенÑÑ ÐºÑлÑÑÑÑÑ Ð¸ обÑазованиÑ. Ð 1886 Ð³Ð¾Ð´Ñ Ð³Ð¾Ñожане пÑиÑвоили ÐилÑÑÐ¸Ð½Ñ Ð·Ð²Ð°Ð½Ð¸Ðµ поÑеÑного гÑажданина ЧеÑеповÑа.' 361 }, 362 { 363 image: 'teatr.jpg', 364 title: 'ÐамеÑнÑй ÑеаÑÑ', 365 text: 'РаÑположен в иÑÑоÑиÑеÑком ÑенÑÑе, Ð²Ñ Ð¾Ð´Ð¸Ñ Ð² анÑÐ°Ð¼Ð±Ð»Ñ Ð·Ð´Ð°Ð½Ð¸Ð¹, обÑазÑÑÑÐ¸Ñ Ð²Ð¾ÑÑмигÑаннÑÑ Ð¿Ð»Ð¾ÑÐ°Ð´Ñ â один из пеÑвÑÑ Ð¿Ð¾Ð´Ð¾Ð±Ð½ÑÑ Ð¾Ð±ÑекÑов в доÑеволÑÑионной РоÑÑии. Ðдание венÑÐ°ÐµÑ Ð±Ð°ÑÐ½Ñ Ñ ÐºÑÑанÑами.' 366 }, 367 { 368 image: 'milutinpark.webp', 369 title: 'ÐилÑÑинÑкий паÑк', 370 text: 'Ðаложен в 1894 Ð³Ð¾Ð´Ñ Ðваном ÐилÑÑинÑм. Ð XIX веке в паÑке вÑÑадили Ñедкие ÑаÑÑениÑ, в 1950-Ñ ÑÑÑановили аÑÑÑакÑионÑ. Ð 2022 Ð³Ð¾Ð´Ñ Ð²Ð¾ÑÑÑановили дендÑопаÑк, Ñделали пÑÑд и новÑе плоÑадки.' 371 }, 372 { 373 image: 'komsomolets.jpg', 374 title: 'ÐиноÑеаÑÑ Â«ÐомÑомолеÑ»', 375 text: 'ÐоÑÑÑоен в 1957 годÑ. «ÐомÑомолеÑ» â ÑÑкий пÑÐ¸Ð¼ÐµÑ ÑÑалинÑкой аÑÑ Ð¸ÑекÑÑÑÑ. ХоÑоÑо ÑÐ¾Ñ ÑанилиÑÑ Ð²Ð½ÑÑÑенние инÑеÑÑеÑÑ Ð·Ð´Ð°Ð½Ð¸Ñ: лепнина, поÑолки Ñ ÑоÑпиÑÑÑ, кованÑе ÑвеÑилÑники и лÑÑÑÑÑ.'
376 }, 377 { 378 image: 'fosagro.jpg', 379 title: 'ЧеÑеповеÑкий пÑоизводÑÑвеннÑй клаÑÑÐµÑ Ð³ÑÑÐ¿Ð¿Ñ Â«Ð¤Ð¾ÑÐгÑо»', 380 text: 'ЯвлÑеÑÑÑ ÐºÑÑпнейÑим в РоÑÑии ÑкÑпоÑÑеÑом ÑоÑÑоÑÑодеÑжаÑÐ¸Ñ ÑдобÑений. ÐоÑÑавки идÑÑ Ð² ÑÑÑÐ°Ð½Ñ Ðападной ÐвÑопÑ, Ðзии, ÐмеÑики, ÐÑÑики.' 381 }, 382 { 383 image: 'zavod.jpg', 384 title: 'ÐеÑаллÑÑгиÑеÑкий завод «СевеÑÑÑалÑ»', 385 text: 'ÐÑоÑой по велиÑине ÑÑалелиÑейнÑй завод РоÑÑии. Ðа «СевеÑÑÑали» ÑабоÑаÑÑ 50 ÑÑÑÑÑ ÑеÑеповÑан. Ðодовой обÑем пÑоизводÑÑва ÑÑали â 11 млн Ñонн. Ðавод поÑÑавлÑÐµÑ Ð¿ÑодÑкÑÐ¸Ñ Ð² 60 ÑÑÑан миÑа.' 386 } 387 ]; 388 389 function show_head_city(i) { 390 if (i<0 || i>16) return ; 391 392 clearTimeout(head_city_timer); 393 if(i==1) $('#head_city .head-city-prev').hide(); else $('#head_city .head-city-prev').show(); 394 if(i==16) $('#head_city .head-city-next').hide(); else $('#head_city .head-city-next').show(); 395 $('#head_city .head-city-prev').unbind('click').click(function(){ 396 show_head_city(i-1); 397 }); 398 $('#head_city .head-city-next').unbind('click').click(function(){ 399 show_head_city(i+1); 400 }); 401 402 var Data = CityObjects[i-1]; 403 $('#head_city .head-city-img img').attr('src', $this.settings.domains.store + '/header/' + Data.image ); 404 $('#head_city .head-city-title-text').text( Data.title ); 405 $('#head_city .head-city-text').text( Data.text ); 406 407 var Object = $('#head_city_'+i); 408 409 if ($('#head_city').css('display')=='block'){ 410 $('#head_city').stop().animate({left:parseInt(Object.css('left'))+(parseInt(Object.css('width'))/2)-120},300); 411 } 412 else{ 413 head_city_timer=setTimeout(function(){ 414 $('#head_city').css('left',parseInt(Object.css('left'))+(parseInt(Object.css('width'))/2)-120).show(); 415 },200); 416 } 417 } 418 419 $('.city-objects .one').each(function(){ 420 $(this).hover(function(){ 421 show_head_city( parseInt($(this).data('id'))); 422 },function(){ 423 clearTimeout(head_city_timer); 424 head_city_timer=setTimeout(function(){$('#head_city').hide();},1000); 425 }); 426 }); 427 428 $('#head_city').hover(function(){ 429 clearTimeout(head_city_timer); 430 },function(){ 431 head_city_timer=setTimeout(function(){$('#head_city').hide();},1000); 432 }); 433 434 435 //ÐккоÑдеон 436 $('.a-fade').click( function(){ 437 var div = $(this).parent().next('.div-fade'); 438 if ($(this).hasClass('fade-up')) { 439 div.slideUp(300); 440 $(this).removeClass('fade-up'); 441 } 442 else { 443 $(this).addClass('fade-up'); 444 div.slideDown(300); 445 } 446 return false; 447 }); 448 449 //пеÑÐµÑ Ð¾Ð´ на мобилÑнÑÑ Ð²ÐµÑÑÐ¸Ñ 450 $('#to-mobile').click( function(){ 451 $.ajax({ 452 url:'/site/to-mobile', 453 dataType: 'json', 454 success: function(json){ 455 document.location.href = json.href; 456 }, 457 error: function(){ 458 document.location.href = $this.settings.domains.mobile; 459 } 460 }); 461 return false; 462 }); 463 464 //Csrf 465 function getCsrf() 466 { 467 return $('meta[name="csrf-token"]').attr("content"); 468 } 469 470 //подпиÑка на ÑаÑÑÑÐ»ÐºÑ 471 this.subscribeDoSub = function( container ) 472 { 473 if ( $('.subscribe-button', container).prop('disabled') ) { 474 return false; 475 } 476 477 if (!subscribeCheckEmail( container )){ 478 $this.show_message('ÐÑибка в ÑлекÑÑонном адÑеÑе'); 479 $('input', container) 480 return false; 481 } 482 483 var text = $('.subscribe-button', container).html(); 484 $('.subscribe-button', container).prop('disabled', true).html('<i class="fa fa-cog fa-spin"></i>'); 485 486 $.ajax({ 487 method:"POST", 488 url:"/subscription/join", 489 data:{email: $("input", container).val().trim(),_csrf:getCsrf()}, 490 dataType:"json", 491 success:function(json){ 492 493 if (json.status=='validate'){ 494 $('.subscribe-button', container).prop('disabled', false).html(text); 495 $this.show_message('ÐÑибка в ÑлекÑÑонном адÑеÑе'); 496 } 497 else if(json.status=='already'){ 498 $('.subscribe-button', container).prop('disabled', false).html(text); 499 $this.show_message('ÐдÑÐµÑ Ñже подпиÑан на ÑаÑÑÑлкÑ'); 500 } 501 else if (json.status=='success'){ 502 $this.show_message('Ðам вÑÑлано пиÑÑмо Ð´Ð»Ñ Ð¿Ð¾Ð´ÑвеÑÐ¶Ð´ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´Ð¿Ð¸Ñки'); 503 $('.error', container).fadeOut(1000); 504 setTimeout(function(){ 505 $('.subscribe-button', container).prop('disabled', false).html(text); 506 $("input", container).val(''); 507 $('.error', container).removeClass('success'); 508 },1000) 509 } 510 } 511 }); 512 return false; 513 } 514 515 function subscribeCheckEmail( container ) 516 { 517 var email = $("input", container).val().trim(); 518 if (email=='') { 519 return false; 520 } 521 var r = /^[\w\.\d-_]+@[\w\.\d-_]+\.\w{2,6}$/i; 522 if ( !r.test(email) ) { 523 return false; 524 } 525 else { 526 return true; 527 } 528 } 529 530 //ÑообÑение 531 this.show_message = function(message) 532 { 533 $('body').append('<div class="show-message"><button type="button" class="close">Ã</button>'+ message + '</div>'); 534 $('.show-message').animate({'opacity':1},300); 535 $('.show-message .close').click( function(){ 536 $('.show-message').animate({'opacity':0},300, function(){ 537 $('.show-message').remove(); 538 }); 539 }); 540 setTimeout( 541 function(){ 542 $('.show-message').animate({'opacity':0},300, function(){ 543 $('.show-message').remove(); 544 }); 545 },3500 546 ); 547 } 548 549 //ÐеÑÑÐ¸Ñ Ð´Ð»Ñ ÑлабовидÑÑÐ¸Ñ 550 $('#poorv-a').click( function(){ 551 if ($this.settings.poorv.active){ 552 $this.poorvTurnOff(); 553 } 554 else { 555 $this.poorvTurnOn();
556 } 557 return false; 558 }); 559 560 $('#poorv-turn-off').click( function(){ 561 $this.poorvTurnOff(); 562 }); 563 564 $('.btn-poorv-more').click( function(){ 565 var input = $('input', $(this)); 566 if (!input.prop('checked')) { 567 $('#poorv-options').css('display', 'block'); 568 } 569 else { 570 $('#poorv-options').css('display', 'none'); 571 } 572 }); 573 574 $('#poorv-panel label.btn-poorv').click( function(){ 575 var input = $('input', $(this)); 576 if(input.length) { 577 var name = input.attr('name').split('-')[1]; 578 var val = input.val(); 579 $('body').removeClass('poorv-' + name + '-' + $this.settings.poorv[name]); 580 $this.settings.poorv[name] = val; 581 582 if (val > 0) { 583 var date = new Date(new Date().getTime() + 3000 * 24 * 60 * 60 * 1000); 584 document.cookie = "poorv-" + name + "=" + val + "; domain=" + $this.settings.domains.base + "; path=/; expires=" + date.toUTCString(); 585 $('body').addClass('poorv-' + name + '-' + val); 586 } else { 587 var date = new Date(new Date().getTime() - 24 * 60 * 60 * 1000); 588 document.cookie = "poorv-" + name + "=0; domain=" + $this.settings.domains.base + "; path=/; expires=" + date.toUTCString(); 589 } 590 } 591 }); 592 593 this.onStartPoorv = function() { 594 $('.lenta-cont').each( function(i, obj){ 595 $(obj).attr('data-height', $(obj).css('height')); 596 $('.lenta-news', $(obj)).css('height','auto'); 597 $(obj).css('height', 'auto'); 598 } ); 599 }; 600 601 this.onEndPoorv = function() { 602 $('.lenta-cont').each( function(i, obj){ 603 $(obj).css('height', $(obj).attr('data-height')); 604 $('.lenta-news', $(obj)).css('height',(parseInt($(obj).attr('data-height'))-5)+'px' ); 605 } ); 606 }; 607 608 this.poorvTurnOn = function(){ 609 $('#poorv-panel').slideDown(300); 610 $this.settings.poorv.active = true; 611 if (!$this.settings.poorv.loaded) { 612 this.lazyLoadCss($this.settings.poorv.css); 613 $this.settings.poorv.loaded = true; 614 } 615 var date = new Date(new Date().getTime() + 3000 * 24 * 60 * 60 * 1000); 616 document.cookie = "poorv=1; domain="+$this.settings.domains.base+"; path=/; expires=" + date.toUTCString(); 617 $('body').addClass('poorv'); 618 $this.onStartPoorv(); 619 }; 620 621 this.poorvTurnOff = function(){ 622 $('#poorv-panel').slideUp(300); 623 $this.settings.poorv.active = false; 624 var date = new Date(new Date().getTime() - 24 * 60 * 60 * 1000); 625 document.cookie = "poorv=0; domain="+$this.settings.domains.base+"; path=/; expires=" + date.toUTCString(); 626 $('body').removeClass('poorv'); 627 $this.onEndPoorv(); 628 } 629 630 this.lazyLoadCss = function(url) { 631 var link = document.createElement("link"); 632 link.setAttribute("rel", "stylesheet"); 633 link.setAttribute("type", "text/css"); 634 link.setAttribute("href", url); 635 document.getElementsByTagName("head")[0].appendChild(link); 636 }; 637 638 this.lazyLoadJs = function (url) { 639 var d = window.document, 640 b = d.body, /* appends at end of body, but you could use other methods to put where you want */ 641 e = d.createElement("script"); 642 643 e.async = true; 644 e.src = url; 645 b.appendChild(e); 646 } 647 648 if ($this.settings.poorv.active) { 649 $this.onStartPoorv(); 650 } 651 652 //ÐлипбоаÑд 653 $(document).ready( function(){ 654 var article = document.querySelector('article'); 655 var hdAdmin = $("body").hasClass("admin-detected"); 656 if (article) { 657 article.addEventListener('copy', function(e){ 658 if(hdAdmin) { 659 var isAgree = true; 660 }else{ 661 var isAgree = confirm("ÐÑи иÑполÑзовании маÑеÑиалов ÑайÑа cherinfo⢠обÑзаÑелÑной ÑвлÑеÑÑÑ Ð¿ÑÑмаÑ, оÑкÑÑÑÐ°Ñ Ð´Ð»Ñ Ð¸Ð½Ð´ÐµÐºÑаÑии гипеÑÑÑÑлка на ÑÑÑаниÑÑ, Ñ ÐºÐ¾ÑоÑой маÑеÑиал заимÑÑвован. ÐипеÑÑÑÑлка должна ÑазмеÑаÑÑÑÑ Ð½ÐµÐ¿Ð¾ÑÑедÑÑвенно в ÑекÑÑе, воÑпÑоизводÑÑем оÑигиналÑнÑй маÑеÑиал cherinfoâ¢, до или поÑле ÑиÑиÑÑемого блока!"); 662 } 663 if(isAgree){ 664 var text = window.getSelection(); 665 var text = text.toString(); 666 //console.log(text); 667 if (text.length > 40) { 668 e.clipboardData.setData('text/plain', text + '\n\nÐÑÑоÑник: ' + location.href); 669 e.preventDefault(); 670 } 671 //console.log(text.length); 672 }else{ 673 e.stopPropagation(); 674 e.preventDefault(); 675 e.clipboardData.setData('text', ''); 676 } 677 }); 678 } 679 }); 680 681}; 682 683//ÐаÑеменение ÑвеÑа 684var pad = function(num, totalChars) { 685 var pad = '0'; 686 num = num + ''; 687 while (num.length < totalChars) { 688 num = pad + num; 689 } 690 return num; 691}; 692 693//Ratio is between 0 and 1 694var changeColor = function(color, ratio, darker) { 695 var difference = Math.round(ratio * 255) * (darker ? -1 : 1), 696 minmax = darker ? Math.max : Math.min, 697 decimal = color.replace( 698 /^#?([a-z0-9][a-z0-9])([a-z0-9][a-z0-9])([a-z0-9][a-z0-9])/i, 699 function() { 700 return parseInt(arguments[1], 16) + ',' + 701 parseInt(arguments[2], 16) + ',' + 702 parseInt(arguments[3], 16); 703 } 704 ).split(/,/); 705 return [ 706 '#', 707 pad(minmax(parseInt(decimal[0], 10) + difference, 0).toString(16), 2), 708 pad(minmax(parseInt(decimal[1], 10) + difference, 0).toString(16), 2), 709 pad(minmax(parseInt(decimal[2], 10) + difference, 0).toString(16), 2) 710 ].join(''); 711};
712var lighterColor = function(color, ratio) { 713 return changeColor(color, ratio, false); 714}; 715var darkerColor = function(color, ratio) { 716 return changeColor(color, ratio, true); 717}; 718 719$(document).ready(function(){ 720 $(document).keydown(function (e) { 721 if ((e.ctrlKey && e.keyCode == 13) || (e.metaKey && e.keyCode == 13)) { 722 e.preventDefault(); 723 var text = ""; 724 if (window.getSelection) { 725 text = window.getSelection().toString(); 726 } else if (document.selection && document.selection.type != "Control") { 727 text = document.selection.createRange().text; 728 } 729 730 if (text.trim()=='') { 731 UserScript.show_message('ÐÑделиÑе ÑÑÐ°Ð³Ð¼ÐµÐ½Ñ ÑекÑÑа Ñ Ð¾Ñибкой'); 732 return ; 733 } 734 if (text.length>500) { 735 UserScript.show_message('ÐÑделеннÑй ÑÑÐ°Ð³Ð¼ÐµÐ½Ñ ÑекÑÑа ÑлиÑком болÑÑой'); 736 return ; 737 } 738 739 var m = new dkmodal(); 740 m.message({ 741 title:'ÐаÑли оÑибкÑ?', 742 html: '<form>\ 743 <label class="control-label">ФÑÐ°Ð³Ð¼ÐµÐ½Ñ ÑекÑÑа Ñ Ð¾Ñибкой:</label>\ 744 <p style="color:#333;font-size:15px;font-weight:600">'+text+'</p>\ 745 <label class="control-label">ÐомменÑаÑий:</label>\ 746 <textarea class="form-control" name="error_comment" placeholder="ÐдеÑÑ Ð¼Ð¾Ð¶Ð½Ð¾ обÑÑÑниÑÑ, в ÑÑм оÑибка"></textarea>\ 747 <input type="hidden" name="error_text" value="'+text+'" />\ 748 <input type="hidden" name="error_page" value="'+location.href+'" />\ 749 <input type="hidden" name="_csrf" value="'+$('meta[name="csrf-token"]').attr("content")+'" />\ 750 </form>', 751 buttons: [ 752 { 753 type:'submit', 754 caption:'ÐÑпÑавиÑÑ', 755 url:'/post/typo', 756 loading:'ÐÑпÑавлÑÑ, ждиÑе', 757 afterSave: function(){ 758 UserScript.show_message('СпаÑибо! ÐÑ Ð¸ÑпÑавим оÑибкÑ.'); 759 } 760 }, 761 { 762 type:'dismiss', 763 caption:'ÐÑмена', 764 className:'btn-default' 765 } 766 ] 767 }); 768 } 769 }); 770 771 $('.container > .section').each(function(indx){ 772 var hi = $(this).height(); 773 if (hi < 2) { 774 $(this).css('margin',0); 775 } 776 // console.log(hi); 777 }); 778 779 //УбиÑаем оÑÑÑÑп, в ÑлÑÑае еÑли Ð²Ð¸Ð´Ð¶ÐµÑ ÑкÑÑÑ, Ñо оÑÑÑÑп Ñ ÑледÑÑÑего виджеÑа бÑÐ´ÐµÑ Ð¾ÑÑÑÑÑÑвоваÑÑ 780 781 var idWidgetSpace; 782 783 $('.widget').each(function(indx){ 784 785 if(indx == idWidgetSpace) { 786 $(this).css('margin-top',0); 787 } 788 789 var hig = $(this).height(); 790 if (hig < 2) { 791 idWidgetSpace = indx + 1; 792 } 793 794 }); 795 796 function windowSize(){ 797 var row2_is_hide = $('.row2-top3').is(':hidden'); 798 799 if ($(window).width() <= '520'){ 800 801 var pn = window.location.pathname.search(/\w+/g); 802 var newshead = $( '<div class="lenta-title" id="main-lenta-title"><a href="'+location.href+'news">ÐовоÑÑи</a>' + 803 '<div style="width: 40px;"><span id="btn-news-play-mobile" class="fa fa-volume-up" onclick="playPause();yaCounter32186889.reachGoal(\'TARGET_NEWS_PLAY\');"></span></div>' ); 804 var is_news_mobile = $('div').is('#news-mobile'); 805 var is_bn_emergency = $('div').is('#bn-emergency'); 806 807 808 if ( (pn<0) && (is_news_mobile) && (!($('#news-mobile').find('div').length)) ) { 809 $.ajax({
810 url: '/news?mobile=1', 811 // data: '', 812 dataType: 'html', 813 method: 'get' 814 }).error(function(){ 815 alert('СеÑÐ²ÐµÑ Ð½Ðµ оÑвеÑаеÑ'); 816 }).done( function(html){ 817 $('#news-mobile').append(newshead); 818 $('#news-mobile').append(html); 819 }); 820 } 821 if (is_bn_emergency){ 822 $('#bn-emergency').removeClass('in'); 823 } 824 825 //} 826 // Banner clock 827 828 }else{ 829 if ($('.col-reklama-main a').is('#banner-fkgs-clock')){ 830 831 var bannerFkgs = document.getElementById("banner-fkgs-clock"); 832 833 if (bannerFkgs) { 834 835 var toDate = 1653944399000; 836 837 function getRemaining(endtime){ 838 var t = endtime - Date.parse(new Date()); 839 // var seconds = Math.floor( (t/1000) % 60 ); 840 var minutes = Math.floor( (t/1000/60) % 60 ); 841 var hours = Math.floor( (t/(1000*60*60)) % 24 ); 842 var days = Math.floor( t/(1000*60*60*24) ); 843 return { 844 'total': t, 845 'days': days, 846 'hours': hours, 847 'minutes': minutes, 848 // 'seconds': seconds 849 }; 850 } 851 852 function iniClock(id, endtime){ 853 var cl = document.getElementById(id); 854 var day1 = cl.querySelector('.day1'); 855 var day2 = cl.querySelector('.day2'); 856 var dayTxt = cl.querySelector('.day-text'); 857 var timeTxt = cl.querySelector('.time-text'); 858 var hours1 = cl.querySelector('.hours1'); 859 var hours2 = cl.querySelector('.hours2'); 860 var timeDelimiter = cl.querySelector('.time-delimiter'); 861 var minutes1 = cl.querySelector('.minutes1'); 862 var minutes2 = cl.querySelector('.minutes2'); 863 // var seconds = cl.querySelector('.seconds'); 864 865 var intrvl = setInterval(updClock,1000); 866 867 function updClock(){ 868 var t = getRemaining(endtime); 869 if(t.total<=0){ 870 clearInterval(intrvl); 871 timeTxt.innerHTML = 'законÑено'; 872 hours1.innerHTML = '0'; 873 hours2.innerHTML = '0'; 874 minutes1.innerHTML = '0'; 875 minutes2.innerHTML = '0'; 876 }else{ 877 if (t.days>0){ 878 var dd = ('0' + t.days).slice(-2); 879 day1.innerHTML = dd.slice(-2,-1); 880 day2.innerHTML = dd.slice(-1); 881 dayTxt.innerHTML = 'дней оÑÑалоÑÑ'; 882 }else{ 883 cl.querySelector('.clockDays').style.display = 'none'; 884 cl.querySelector('.clockTime').style.display = 'block'; 885 timeDelimiter.classList.toggle('delimiter-hide'); 886 timeTxt.innerHTML = 'оÑÑалоÑÑ'; 887 var hh = ('0' + t.hours).slice(-2); 888 hours1.innerHTML = hh.slice(-2,-1); 889 hours2.innerHTML = hh.slice(-1); 890 timeDelimiter.innerHTML = ':'; 891 var mm = ('0' + t.minutes).slice(-2); 892 minutes1.innerHTML = mm.slice(-2,-1); 893 minutes2.innerHTML = mm.slice(-1); 894 // seconds.innerHTML = ' : '+('0' + t.seconds).slice(-2); 895 } 896 } 897 // console.log(t); 898 } 899 } 900 901 iniClock('clockToDate', toDate); 902 903 } 904 } 905 } 906 // Banner clock end ------------------------------------------------------------ 907 908 if (row2_is_hide){ 909 $('.section-hidden > .row').addClass('row-mobile').removeClass('row'); 910 $('.section-alarm > .row').addClass('row-mobile').removeClass('row'); 911 if (!$('div').is('.col-top3-clone')){ 912 var trans_col = $('.row2-top3').find('.col-top3').clone().addClass('col-top3-clone'); 913 $('.row2-top3').find('.col-top3').hide(); 914 $('.row2-top3').closest('.col-sm-4').after(trans_col); 915 } 916 if (!$('div').is('.col-reklama-main-clone')){ 917 var col_reklama_main = $('.row-mobile').find('.col-reklama-main'); 918 var col_reklama_main_widget = col_reklama_main.find('.widget'); 919 920 if ($(col_reklama_main_widget).length >1){ 921 $(col_reklama_main_widget).each( function(index, element){ 922 if ($(this).height() > 300 ){ 923 var div_add = '<div class="widget widget-add-hidden">'; 924 $(this).after(div_add ); 925 } 926 }) 927 } 928 var col_reklama_clone = col_reklama_main.clone().addClass('col-reklama-main-clone').removeClass('col-reklama-main'); 929 $('.row-mobile').find('.col-reklama-main').after(col_reklama_clone); 930 } 931 932 } else { 933 if ($('div').is('.col-reklama-main-clone')){ 934 $('.col-reklama-main-clone').remove(); 935 var widget_add_hidden = $('.row-mobile').find('.col-reklama-main .widget-add-hidden'); 936 widget_add_hidden.remove(); 937 } 938 $('.section-hidden > .row-mobile').addClass('row').removeClass('row-mobile'); 939 $('.section-alarm > .row-mobile').addClass('row').removeClass('row-mobile'); 940 941 if ($('div').is('.col-top3-clone')){ 942 $('.col-top3-clone').remove(); 943 $('.row2-top3').find('.col-top3').show(); 944 } 945 } 946// transfer banner gu 947 948 function transfer_posGU(is_mobile,widget_source,target_pos){ 949 var widget = $('#'+widget_source).parent(); 950 var widget_parent_target = widget.closest('.row').find(target_pos); 951 if (widget_parent_target){ 952 if (is_mobile){ 953 widget.removeClass('widget-pos-mobile '+widget_source); 954 widget_parent_target.append(widget); 955 }else{ 956 widget.addClass('widget-pos-mobile '+widget_source); 957 widget_parent_target.after(widget); 958 } 959 } 960 } 961 962 if ($('.col-nomobile iframe').is('#widgetPosId')){ 963 964 var is_pos_mobile = $('div').is('.widget-pos-mobile.widgetPosId'); 965 966 if ($(window).width() <= '976'){ 967 if (!is_pos_mobile){ transfer_posGU(is_pos_mobile,'widgetPosId','.col-mobile .mayor-header'); } 968 }else{ 969 if (is_pos_mobile){ transfer_posGU(is_pos_mobile,'widgetPosId','.col-nomobile'); } 970 } 971 } 972 973 if ($('.col-nomobile div').is('#js-show-iframe-wrapper')){ 974 var is_pos_mobile = $('div').is('.widget-pos-mobile.js-show-iframe-wrapper'); 975 976 if ($(window).width() <= '976'){ 977 if (!is_pos_mobile){ transfer_posGU(is_pos_mobile,'js-show-iframe-wrapper','.col-mobile .mayor-header'); } 978 }else{ 979 if (is_pos_mobile){ transfer_posGU(is_pos_mobile,'js-show-iframe-wrapper','.col-nomobile'); } 980 } 981 } 982 983 984 } 985 986 $(window).on('load resize',windowSize); 987 988 // page download ajax 989 990 function load_news(t, page, m, type) 991 { 992 t.html(''); 993 t.addClass('div-loader'); 994 $.ajax({
995 url: '/'+type+'?page='+page+'&mobile='+m, 996 method:'GET', 997 dataType:'html', 998 success: function(html) { 999 t.replaceWith(html); 1000 } 1001 }); 1002 } 1003 1004 1005 $('.content').on('click', '.more-news', function(e){ 1006 e.preventDefault(); 1007 var page = $(this).data('page'); 1008 var type = $(this).data('type'); 1009 var m = $(this).data('m'); 1010 if (m) window.history.pushState({}, document.title, '/'); 1011 var t = $(this).parent(); 1012 load_news(t, page, m, type); 1013 }); 1014 // for iframe's banners 1015 function listener(event) { 1016 var orgHost = document.location.protocol+'//st.'+document.location.host; 1017 if (event.origin !== orgHost) {return;} 1018 var data = event.data; 1019 var arrData = []; 1020 if (typeof data === 'string' || data instanceof String){ 1021 arrData = data.split(';'); 1022 if ( arrData.length == 2 && parseInt(arrData[1],10)>0 ) { 1023 $( "iframe."+arrData[0] ).each(function( index ) { 1024 $( this ).parent().css('height', arrData[1]); 1025 $( this ).css('height', arrData[1]); 1026 }); 1027 } 1028 } 1029 } 1030 if (window.addEventListener) { 1031 window.addEventListener("message", listener); 1032 }else{ 1033 // IE8 1034 window.attachEvent("onmessage", listener); 1035 } 1036 1037// for cookie-informed 1038// $("#cookie_close_btn").on( "click", function() { 1039// $(".cookie-inform").css("display","none"); 1040// let date = new Date(Date.now() + (60 * 1000 * 60 * 24 * 100)); 1041// document.cookie = "cookie_informed=true; expires=" + date; 1042// } ); 1043 1044 // $("#cookie_informed_btn").on( "click", function() { 1045 // $(".cookie-inform").css("display","none"); 1046 // let date = new Date(Date.now() + (24 * 60 * 60 * 1000)); 1047 // document.cookie = "cookie_informed=true; expires=" + date; 1048 // } ); 1049 1050 if (document.cookie.indexOf('cookie_informed=true') === -1) { 1051 $(".cookie-inform").show(); 1052 } 1053 1054 $("#cookie_informed_btn").on("click", function() { 1055 $(".cookie-inform").hide(); 1056 let date = new Date(); 1057 date.setDate(date.getDate() + 7); 1058 1059 document.cookie = "cookie_informed=true; expires=" + date.toUTCString() + 1060 "; path=/; domain=.cherinfo.ru"; 1061 }); 1062 1063});
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.