1(function ($) { 2 $('body').on('click', '.article_static_contents__list__item', function(){ 3 const parent = $(this).parentsUntil('.page-content.inside_page'); 4 var data_id = $(this).attr('data-id'); 5 var destination = 0; 6 if (data_id == 0) { 7 destination = $(parent).find('.text-article__inside').offset().top + 48 + $(parent).find('.article_static_contents').height(); 8 } else if (data_id > 0) { 9 destination = $(parent).find('.article_page__row h2').eq(data_id-1).offset().top - $(parent).find('.article_page__row h2').eq(data_id-1).css('margin-top').replace('px', ''); 10 } 11 var admin_toolbar = 0; 12 if ($('#toolbar-item-administration-tray').length > 0) { 13 admin_toolbar = Number($('#toolbar-item-administration-tray').height()) + Number($('#toolbar-bar').height()); 14 } 15 var total_top_margin = Number($('.top-panel-inside__bottom').height()) + Number($('.ticker').height()) + Number(admin_toolbar); 16 17 $('html, body').animate( { scrollTop: destination - total_top_margin }, 300 ); 18 }); 19 20 21 function build_navigation(base = $('.page-content.inside_page')) { 22 if (base && base[0] && base[0].parentElement && base[0].parentElement.classList.contains('landing')) { 23 return; 24 } 25 26 const articleBase = $(base).find('.text-article__inside'); 27 28 if (!articleBase.hasClass('show_contents')) { 29 return; 30 } 31 32 const h2s = $(base).find('.text-article__inside h2'); 33 const hasContents = $(base).find('.article_static_contents').length > 0; 34 if (h2s.length > 0 && !hasContents) { 35 articleBase.prepend(` 36 <div class="article_static_contents"> 37 <div class="article_static_contents__title"> 38 ${isEnglish ? 'Content' : 'СодеÑжание'} 39 </div> 40 <div class="article_static_contents__list"></div> 41 </div> 42 `); 43 const contentsBase = $(base).find('.article_static_contents__list'); 44 h2s.each(function(index){ 45 const newItem = `<div class="article_static_contents__list__item" data-id="${index + 1}"> 46 <div class="article_static_contents__list__item__label"> 47 ${$(this).text()} 48 </div> 49 </div>`; 50 contentsBase.append(newItem); 51 }); 52 } 53 } 54 build_navigation(); 55 56 const firstTop = jQuery('.page-content.inside_page h1')[0].getBoundingClientRect().top; 57 jQuery(window).on("scroll", function () { 58 jQuery('.page-content.inside_page').each(function () { 59 const anchor = jQuery(this).find('h1')[0] 60 const rect = anchor.getBoundingClientRect(); 61 let blockIsInView = (window.scrollY >= (rect.top - firstTop)) && (rect.bottom >= 0 && rect.top <= window.innerHeight); 62 if (blockIsInView) { 63 if (!jQuery(this).hasClass('active')) { 64 jQuery('.page-content.inside_page').removeClass('active'); 65 setTimeout(() => { 66 article_viewed(jQuery(this)); 67 build_navigation(jQuery(this)); 68 }, 100); 69 } 70 } 71 }); 72 }); 73 74 //console.log("123 puid8 " + puid8); 75 window.dataIdArticle = jQuery('input[name="current_article_id"]').val(); 76 jQuery('.page-content.inside_page').eq(0).addClass('active').attr('data-url', window.location.href).attr('data-id-article', window.dataIdArticle).attr('data-viewed-article', 'true'); 77 document.dispatchEvent(new CustomEvent('dataIdArticleInit')); 78 window.language = document.documentElement.lang 79 jQuery('body').on('click', '.popup_window_termin__show', function () { 80 return false; 81 }); 82 83 // блок ÑпÑавка вÑÑаиваемÑй внÑÑÑÑ ÑÑаÑÑи и оÑобÑажаÑÑего конÑÐµÐ½Ñ Ð´ÑÑгого маÑеÑиала 84 var current_scroll_page = jQuery(window).scrollTop(); 85 jQuery('.popup_window_spravka__show').on('click', function () { 86 var spravka_block = jQuery('.popup_window_spravka[data-material-id="' + jQuery(this).attr('data-material-id') + '"]'); 87 spravka_block.addClass('active'); 88 jQuery('body').addClass('stop_scroll'); 89 current_scroll_page = jQuery(window).scrollTop(); 90 if (jQuery(window).width() > 767) { 91 var new_height = jQuery(window).height() - 200; 92 } else { 93 var new_height = jQuery(window).height() - 150; 94 } 95 if (new_height > spravka_block.find('.spravka2__bottom__inside__content').height()) { 96 new_height = spravka_block.find('.spravka2__bottom__inside__content').height() + 20; 97 } 98 spravka_block.find('.spravka2__bottom__inside').height(new_height); 99 return false;
100 }); 101 102 jQuery('.popup_window_spravka__inside__close').on('click', function () { 103 jQuery('body').removeClass('stop_scroll'); 104 jQuery(window).scrollTop(current_scroll_page); 105 jQuery('.popup_window_spravka').removeClass('active'); 106 }); 107 108 $('.popup_window_spravka').click(function (e) { 109 if (!$(e.target).closest('.popup_window_spravka__inside').length) { 110 $(this).removeClass("active"); 111 jQuery('body').removeClass('stop_scroll'); 112 jQuery(window).scrollTop(current_scroll_page); 113 } 114 }); 115 116 /** 117 * 118 */ 119 function resize_block_spravka() { 120 jQuery('.popup_window_spravka.active .spravka2__bottom__inside').height(jQuery(window).height() - 200); 121 } 122 123 var adriver_banners = {}; 124 125 /** 126 * 127 */ 128 function adriver_banner_right_sidebar() { 129 130 // ÐÐ°Ð½Ð½ÐµÑ ÑÐ±Ð¾ÐºÑ 131 var active_page = '.page-content.inside_page.active'; 132 var type_material = jQuery(active_page + ' input[name="type_material"]').val(); 133 var id_adbaner_block_right_sidebar = jQuery('.page-content.inside_page.active .adriver_banner_right_side').attr('id'); 134 if (ar_pz == undefined) var ar_pz = -~ar_pz; 135 // console.log('иÑполнÑеÑÑÑ1 ' + id_adbaner_block_right_sidebar); 136 if (id_adbaner_block_right_sidebar != 'adriver_banner_240' && id_adbaner_block_right_sidebar != 'adriver_banner_300m') { 137 console.log('иÑполнÑеÑÑÑ'); 138 var count_adriver_banners = Number(jQuery('.adriver_banner_right_side').length) + 1; 139 if (jQuery(active_page + ' .article_page__right .adriver_banner_right_side').length == 0) { 140 if (jQuery(window).width() >= 1024) { 141 var partners_blocks = '<div id="adriver_banner_240_' + count_adriver_banners + '" class="adriver_banner_right_side"></div>'; 142 } else { 143 var partners_blocks = '<div id="adriver_banner_300m_' + count_adriver_banners + '" class="adriver_banner_right_side"></div>'; 144 } 145 if (jQuery(window).width() > 767) { 146 partners_blocks += '<div class="adfox_small_block" id="adfox_152164110949939497_' + count_adriver_banners + '"></div>'; 147 } 148 149 150 if (jQuery('.page-content.inside_page.active .article_page__right .live-news__wrapper').length > 0) { 151 jQuery('.page-content.inside_page.active .article_page__right .live-news__wrapper').after(partners_blocks); 152 } else { 153 jQuery('.page-content.inside_page.active .article_page__right').prepend(partners_blocks); 154 } 155 } 156 157 var new_page_special_content = jQuery('.page-content.inside_page.active').attr('data-special-content'); 158 var id_adbaner_block_right_sidebar = jQuery('.page-content.inside_page.active .adriver_banner_right_side').attr('id'); 159 if (jQuery(window).width() > 767) { 160 var id_adfox_small_block_right_sidebar = jQuery('.page-content.inside_page.active .adfox_small_block').attr('id'); 161 } 162 163 164 if (jQuery(active_page + ' .article_page__right .adriver_banner_right_side div').length == 0 && !jQuery(active_page + ' .article_page__right .adriver_banner_right_side').hasClass('busy')) { 165 jQuery(active_page + ' .article_page__right .adriver_banner_right_side').addClass('busy'); 166 167 if (jQuery(window).width() >= 1024) { 168 169 var data_adriver = 'sid:216987,bt:52,bn:2,onScroll:true, pz: ar_pz'; 170 171 // вÑÑавлÑем ÑекламнÑй Ð±Ð°Ð½ÐµÑ Ð² завиÑимоÑÑи Ð¾Ñ Ñипа маÑеÑиала и веÑÑии ÑайÑа (деÑкÑоп или мобилÑнаÑ) 172 if (type_material == 'article') { 173 // console.log('Реклама Ð´Ð»Ñ ÑÑаÑÑи'); 174 data_adriver = "sid:216987,bt:52,bn:2,onScroll:true,custom:{8:'article'}, pz: ar_pz"; 175 data_adriver2 = { 176 'sid': 216987, 177 'bt': 52, 178 'bn': 2, 179 'onScroll': true, 180 'custom': {8: 'article'}, 181 'pz': ar_pz 182 }; 183 } else if (type_material == 'blog' || type_material == 'photo_list' || type_material == 'video') { 184 // console.log('Реклама Ð´Ð»Ñ ÐÐ½ÐµÐ½Ð¸Ñ | ФоÑогалеÑеи | Ðидео'); 185 data_adriver = "sid:216987,bt:52,bn:2,onScroll:true,custom:{8:'blog'}, pz: ar_pz"; 186 data_adriver2 = { 187 'sid': 216987, 188 'bt': 52, 189 'bn': 2, 190 'onScroll': true, 191 'custom': {8: 'blog'}, 192 'pz': ar_pz 193 }; 194 } else if (type_material == 'chart' || type_material == 'news' || type_material == 'photo_item') { 195 // console.log('Реклама Ð´Ð»Ñ ÐнÑогÑаÑики | ÐовоÑÑи | ФоÑо'); 196 data_adriver = "sid:216987,bt:52,bn:2,onScroll:true,custom:{8:'spec1'}, pz: ar_pz"; 197 data_adriver2 = { 198 'sid': 216987, 199 'bt': 52, 200 'bn': 2, 201 'onScroll': true, 202 'custom': {8: 'spec1'}, 203 'pz': ar_pz 204 }; 205 } 206 207 // adUnits.push({ 208 // code: id_adbaner_block_right_sidebar, 209 // bids: [{ 210 // bidder: 'criteo', 211 // params: { 212 // zoneid: 1213974, 213 // } 214 // }] 215 // }); 216 217 // оÑклÑÑено 218 // // adUnits.addAdUnits({ 219 // // code: id_adbaner_block_right_sidebar, // 240x400 220 // // bids: [{ 221 // // bidder: 'criteo', 222 // // params: { 223 // // zoneid: 1213974, 224 // // } 225 // // }] 226 // // }); 227 // // console.log(adUnits); 228 // window.Ya.adfoxCode.createScroll({ 229 // ownerId: 264443, sequentialLoading: true, 230 // containerId: id_adbaner_block_right_sidebar, 231 // params: { 232 // extid_tag: 'izvestia', 233 // p1: 'bzirr', 234 // p2: 'fulg', 235 // puid8: puid8, 236 // puid12: '186114', 237 // puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0', 238 // extid: make_custom_id_user() 239 // // pk: rutarget.adfox.getAdState('39') 240 // } 241 // }, ['desktop', 'tablet', 'phone'], { 242 // tabletWidth: 830, 243 // phoneWidth: 480, 244 // isAutoReloads: false 245 // }); 246 247 248 if (new_page_special_content == true || new_page_special_content == 'true') { 249 // if (typeof window.iz !== 'undefined' && window.iz) { 250 window.Ya.adfoxCode.createScroll({ 251 ownerId: 264443, sequentialLoading: true, 252 containerId: id_adbaner_block_right_sidebar, 253 params: { 254 p1: 'bzirr', 255 p2: 'fulg', 256 puid4: 'iz.ru', 257 puid8: puid8, 258 puid12: '186114', 259 puid21: '2', 260 puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0' 261 // pk: rutarget.adfox.getAdState('39') 262 } 263 }, ['desktop', 'tablet', 'phone'], { 264 tabletWidth: 830, 265 phoneWidth: 480, 266 isAutoReloads: false 267 }); 268 } else { 269 window.Ya.adfoxCode.createScroll({ 270 ownerId: 264443, sequentialLoading: true, 271 containerId: id_adbaner_block_right_sidebar, 272 params: { 273 p1: 'bzirr', 274 p2: 'fulg', 275 puid4: 'iz.ru', 276 puid8: puid8, 277 puid12: '186114', 278 puid21: '1', 279 puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0' 280 // pk: rutarget.adfox.getAdState('39') 281 } 282 }, ['desktop', 'tablet', 'phone'], { 283 tabletWidth: 830, 284 phoneWidth: 480, 285 isAutoReloads: false 286 }); 287 } 288 289 290 } else { 291 292 var data_adriver = 'sid:216987,bt:52,bn:11,onScroll:true, pz: ar_pz'; 293 294 if (type_material == 'article') { 295 // console.log('Реклама Ð´Ð»Ñ ÑÑаÑÑи'); 296 data_adriver = "sid:216987,bt:52,bn:11,onScroll:true,custom:{8:'article'}, pz: ar_pz"; 297 data_adriver2 = { 298 'sid': 216987, 299 'bt': 52, 300 'bn': 11, 301 'onScroll': true, 302 'custom': {8: 'article'}, 303 'pz': ar_pz 304 }; 305 } else if (type_material == 'blog' || type_material == 'photo_list' || type_material == 'video') { 306 // console.log('Реклама Ð´Ð»Ñ ÐÐ½ÐµÐ½Ð¸Ñ | ФоÑогалеÑеи | Ðидео'); 307 data_adriver = "sid:216987,bt:52,bn:11,onScroll:true,custom:{8:'blog'}, pz: ar_pz"; 308 data_adriver2 = { 309 'sid': 216987, 310 'bt': 52, 311 'bn': 11, 312 'onScroll': true, 313 'custom': {8: 'blog'}, 314 'pz': ar_pz 315 }; 316 } else if (type_material == 'chart' || type_material == 'news' || type_material == 'photo_item') { 317 // console.log('Реклама Ð´Ð»Ñ ÐнÑогÑаÑики | ÐовоÑÑи | ФоÑо'); 318 data_adriver = "sid:216987,bt:52,bn:11,onScroll:true,custom:{8:'spec1'}, pz: ar_pz"; 319 data_adriver2 = { 320 'sid': 216987, 321 'bt': 52, 322 'bn': 11, 323 'onScroll': true, 324 'custom': {8: 'spec1'}, 325 'pz': ar_pz 326 }; 327 } 328 329 // оÑклÑÑено (бÑл ÐºÐ¾Ð¼ÐµÐ½Ñ "ÑаÑкоменÑиÑÑ") 330 // window.Ya.adfoxCode.createScroll({ 331 // ownerId: 264443, sequentialLoading: true, 332 // containerId: id_adbaner_block_right_sidebar, 333 // params: { 334 // extid_tag: 'izvestia', 335 // p1: 'bzisp', 336 // p2: 'fulj', 337 // puid8: puid8, 338 // puid12: '186114', 339 // puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0', 340 // extid: make_custom_id_user() 341 // // pk: rutarget.adfox.getAdState('39') 342 // } 343 // }, ['desktop', 'tablet', 'phone'], { 344 // tabletWidth: 830, 345 // phoneWidth: 480, 346 // isAutoReloads: false 347 // }); 348 349 // adUnits.push({ 350 // code: id_adbaner_block_right_sidebar, 351 // bids: [{ 352 // bidder: 'criteo', 353 // params: { 354 // zoneid: 1213976, 355 // } 356 // }] 357 // }); 358 359 // if (typeof window.iz !== 'undefined' && window.iz) { 360 if (new_page_special_content == true || new_page_special_content == 'true') { 361 window.Ya.adfoxCode.createScroll({ 362 ownerId: 264443, sequentialLoading: true, 363 containerId: id_adbaner_block_right_sidebar, 364 params: { 365 p1: 'bzisp', 366 p2: 'fulj', 367 puid4: 'iz.ru', 368 puid8: puid8, 369 puid12: '186114', 370 puid21: '2', 371 puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0' 372 // pk: rutarget.adfox.getAdState('39') 373 } 374 }, ['desktop', 'tablet', 'phone'], { 375 tabletWidth: 830, 376 phoneWidth: 480, 377 isAutoReloads: false 378 }); 379 } else { 380 window.Ya.adfoxCode.createScroll({ 381 ownerId: 264443, sequentialLoading: true, 382 containerId: id_adbaner_block_right_sidebar, 383 params: { 384 p1: 'bzisp', 385 p2: 'fulj', 386 puid4: 'iz.ru', 387 puid8: puid8, 388 puid12: '186114', 389 puid21: '1', 390 puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0' 391 // pk: rutarget.adfox.getAdState('39') 392 } 393 }, ['desktop', 'tablet', 'phone'], { 394 tabletWidth: 830, 395 phoneWidth: 480, 396 isAutoReloads: false 397 }); 398 } 399 400 401 } 402 403 if (jQuery(window).width() > 767) { 404 405 // оÑклÑÑено 406 // window.Ya.adfoxCode.createScroll({ 407 // ownerId: 264443, sequentialLoading: true, 408 // containerId: id_adfox_small_block_right_sidebar, 409 // params: { 410 // extid_tag: 'izvestia', 411 // p1: 'bzygw', 412 // p2: 'fvxx', 413 // puid8: puid8, 414 // puid12: '186114', 415 // puid26: typeof window.iz !== 'undefined' && typeof w
415indow.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0', 416 // extid: make_custom_id_user(), 417 // } 418 // }, ['desktop', 'tablet', 'phone'], { 419 // tabletWidth: 830, 420 // phoneWidth: 480, 421 // isAutoReloads: false 422 // }); 423 424 // if (typeof window.iz !== 'undefined' && window.iz) { 425 if (new_page_special_content == true || new_page_special_content == 'true') { 426 window.Ya.adfoxCode.createScroll({ 427 ownerId: 264443, sequentialLoading: true, 428 containerId: id_adfox_small_block_right_sidebar, 429 params: { 430 p1: 'bzygw', 431 p2: 'fvxx', 432 puid4: 'iz.ru', 433 puid8: puid8, 434 puid12: '186114', 435 puid21: '2', 436 puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0' 437 } 438 }, ['desktop', 'tablet', 'phone'], { 439 tabletWidth: 830, 440 phoneWidth: 480, 441 isAutoReloads: false 442 }); 443 } else { 444 window.Ya.adfoxCode.createScroll({ 445 ownerId: 264443, sequentialLoading: true, 446 containerId: id_adfox_small_block_right_sidebar, 447 params: { 448 p1: 'bzygw', 449 p2: 'fvxx', 450 puid4: 'iz.ru', 451 puid8: puid8, 452 puid12: '186114', 453 puid21: '1', 454 puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0' 455 } 456 }, ['desktop', 'tablet', 'phone'], { 457 tabletWidth: 830, 458 phoneWidth: 480, 459 isAutoReloads: false 460 }); 461 } 462 463 } else { 464 465 } 466 467 jQuery(active_page + ' .adriver_banner_right_side').removeClass('busy'); 468 } else { 469 // console.log('here'); 470 window.Ya.adfoxCode.reload(jQuery('.page-content.inside_page.active .adriver_banner_right_side').attr('id')); 471 // if (jQuery(window).width() > 767 || jQuery('.page-content.inside_page').eq(0).attr('data-id-article') == "710460") { 472 if (jQuery(window).width() > 767) { 473 window.Ya.adfoxCode.reload(jQuery('.page-content.inside_page.active .adfox_small_block').attr('id')); 474 } 475 } 476 } else { 477 window.Ya.adfoxCode.reload(jQuery('.page-content.inside_page.active .adriver_banner_right_side').attr('id')); 478 if (jQuery(window).width() > 767) { 479 window.Ya.adfoxCode.reload(jQuery('.page-content.inside_page.active .adfox_small_block').attr('id')); 480 } 481 } 482 483 484 if (jQuery(window).width() > 767 && jQuery('.page-content.inside_page.active .epilog_page .our_banner_place_adfox').length == 0) { 485 var count_our_banner_place_adfox = jQuery('.our_banner_place_adfox').length; 486 487 //jQuery('.page-content.inside_page.active .epilog_page').append('<div class="margin-20-0"><div class="block-container-margins our_banner_place_adfox" id="our_banner_place_adfox_' + count_our_banner_place_adfox + '"><div class="our_banner_place_adfox__inside" id="adfox_151870577105355880_' + count_our_banner_place_adfox + '"></div></div></div>'); 488 489 // adUnits.push({ 490 // code: 'adfox_151870577105355880_' + count_our_banner_place_adfox, 491 // bids: [ 492 // { 493 // "bidder": "criteo", 494 // "params": { 495 // "placementId": "1213975" 496 // } 497 // }, 498 // { 499 // "bidder": "adriver", 500 // "params": { 501 // "placementId": "30:izv_970x250_top" 502 // } 503 // }, 504 // { 505 // "bidder": "myTarget", 506 // "params": { 507 // "placementId": "237899" 508 // } 509 // }, 510 // { 511 // "bidder": "betweenDigital", 512 // "sizes": [ 513 // [970, 250], 514 // [728, 250], 515 // [728, 90], 516 // [990, 90], 517 // [990, 250] 518 // ], 519 // "params": { 520 // "placementId": "2482024" 521 // } 522 // } 523 // ], 524 // sizes: [ 525 // [ 526 // 970, 527 // 250 528 // ], 529 // [ 530 // 728, 531 // 250 532 // ], 533 // [ 534 // 728, 535 // 90 536 // ], 537 // [ 538 // 990, 539 // 90 540 // ], 541 // [ 542 // 990, 543 // 250 544 // ] 545 // ] 546 // }); 547 // window.Ya.adfoxCode.createScroll({ 548 // ownerId: 264443, sequentialLoading: true, 549 // containerId: 'adfox_151870577105355880_' + count_our_banner_place_adfox, 550 // params: { 551 // extid_tag: 'izvestia', 552 // p1: 'bzorp', 553 // p2: 'fulf', 554 // puid8: puid8, 555 // puid12: '186114', 556 // puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0', 557 // extid: make_custom_id_user(), 558 // } 559 // }, ['desktop', 'tablet', 'phone'], { 560 // tabletWidth: 830, 561 // phoneWidth: 480, 562 // isAutoReloads: false 563 // }); 564 } else { 565 window.Ya.adfoxCode.reload(jQuery('.page-content.inside_page.active .our_banner_place_adfox__inside').attr('id')); 566 } 567 568 // пеÑÐµÐµÑ Ð°Ð» в partners-block.js 569 /*if (jQuery(window).width() > 767) { 570 571 if (jQuery('.page-content.inside_page.active .epilog_page .lentainform').length == 0) { 572 //console.log('lentainform added'); 573 var news_partners__inside_lentainform = jQuery('.lentainform').length; 574 575 jQuery('.page-content.inside_page.active .epilog_page').append('<div class="margin-20-0"><div class="block-container-margins lentainform" id="lentainform_' + news_partners__inside_lentainform + '"><div id="M410973ScriptRootC678965"><div id="M410973PreloadC678965"> ÐагÑÑзка... </div></div></div></div>'); 576 (function () { 577 var script = document.createElement('script'); 578 script.src = "//jsc.lentainform.com/i/z/iz.ru.678965.js?t=" + Math.floor((new Date()).getTime() / 36e5); 579 script.async = true; 580 document.body.appendChild(script); 581 })(); 582 } 583 584 } else { 585 586 if (jQuery('.page-content.inside_page.active .epilog_page .composite_star').length == 0) { 587 //console.log('composite_star added'); 588 var news_partners__inside_composite_star = jQuery('.composite_star').length; 589 590 jQuery('.page-content.inside_page.active .epilog_page').append('<div class="margin-20-0"><div class="block-container-margins composite_star" id="composite_star_' + news_partners__inside_composite_star + '"><div id="M473732ScriptRootC845499"> </div></div></div>'); 591 (function () { 592 var script = document.createElement('script'); 593 script.src = "https://jsc.lentainform.com/i/z/iz.ru.845499.js"; 594 script.async = true; 595 document.body.appendChild(script); 596 })(); 597 } 598 599 }*/ 600
601 // if (jQuery('.page-content.inside_page.active .epilog_page .news_partners__inside.mirtesen').length == 0) { 602 // var news_partners__inside_mirtesen = jQuery('.news_partners__inside.mirtesen').length; 603 604 // jQuery('.page-content.inside_page.active .epilog_page').append('<div class="margin-20-0"><div class="block-container-margins" id="mirtesen_' + news_partners__inside_mirtesen + '"><div id="unit_90755"><a href="https://mirtesen.ru/">ÐовоÑÑи mirtesen.ru</a></div></div></div>'); 605 // (function() { 606 // var sc = document.createElement('script'); sc.type = 'text/javascript'; sc.async = true; 607 // sc.src = '//news.mirtesen.ru/data/js/90755.js'; sc.charset = 'utf-8'; 608 // var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sc, s); 609 // }()); 610 611 // } 612 613 614 } 615 616 var count_loaded_news = 0; 617 var name_banner = '23-03-peterburg-78-seconds_1300x240.jpg'; 618 var href_banner = 'https://78.ru/topic/peterburgovedenie?utm_source=izru'; 619 620 // ÑÑо ÑÑнкÑÐ¸Ñ Ð²ÑÑавлÑÐµÑ Ð±Ð»Ð¾Ðº Ñ ÑекомендаÑиÑми коÑоÑÑе ÑоÑмиÑÑÑÑÑÑ Ð¸Ð·Ð²Ð½Ðµ 621 622 /** 623 * 624 * @param num 625 * @returns {boolean} 626 */ 627 function isInteger(num) { 628 return (num ^ 0) === num; 629 } 630 631 if (jQuery('.load_more_news').length == 0) { 632 var load_more_news_block = '' + 633 '<div class="load_more_news">' + 634 '<div class="block-container first"></div>' + 635 '<div class="block-container two">' + 636 '<div class="load_more_news__text">' + 637 '<div class="load_more_news__text__icon"></div>' + 638 '<div class="load_more_news__text__label">СледÑÑÑÐ°Ñ Ð½Ð¾Ð²Ð¾ÑÑÑ</div>' + 639 '</div>' + 640 '</div>' + 641 '<div class="block-container three"></div>' + 642 '</div>'; 643 jQuery('body').append(load_more_news_block); 644 } 645 646 // оÑÑлеживаем навигаÑÐ¸Ñ ÐºÐ½Ð¾Ð¿Ð¾Ðº впеÑед и наÐ
646·Ð°Ð´ ÑÑандаÑÑнÑÑ Ð² бÑаÑзеÑе 647 jQuery(window).bind('popstate', function () { 648 // еÑли кликнÑли на назад или впеÑед Ñо Ð¼Ñ Ð¿ÐµÑÐµÑ Ð¾Ð¶Ð¸Ð¼ на нÑжнÑй URl 649 location.href = window.location.origin + "/" + location.pathname; 650 }); 651 652 /** 653 * ФÑнкÑиÑ, коÑоÑÐ°Ñ Ð¿Ð¾Ð´Ð³ÑÑÐ¶Ð°ÐµÑ Ð½Ð¾Ð²Ð¾ÑÑи новÑе 654 * @param busy 655 */ 656 function load_more_news(busy) { 657 658 if (typeof window['related_lock'] === 'undefined') { 659 window['related_lock'] = false; 660 } 661 if (typeof window['related_count'] === 'undefined') { 662 window['related_count'] = 2; 663 } 664 665 if (window['related_lock']) { 666 return; 667 } 668 669 if (!jQuery('#header').hasClass('landing') && jQuery('.page-content.active input[name="type_material"]').val() != undefined) { 670 // еÑли ÑкÑÑÑого инпÑÑа Ð½ÐµÑ ÐºÐ¾ÑоÑÑй оÑвеÑÐ°ÐµÑ Ð·Ð° занÑÑоÑÑÑ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ ÑкÑипÑа Ñо добавлÑем его 671 if (jQuery('#load_more_news_busy').length === 0) { 672 jQuery('body').append('<input id="load_more_news_busy" type="hidden" value="0">'); 673 } 674 var load_more_news_busy = jQuery('#load_more_news_busy').val(); // знаÑение поел коÑоÑое Ñавно либо 0 либо 1 еÑли ÑкÑÐ¸Ð¿Ñ Ð½Ðµ нÑжно иÑполнÑÑÑ (еÑли он Ñже иÑполнÑеÑÑÑ) 675 var current_scroll = jQuery(window).scrollTop(); // ÑекÑÑÐ°Ñ Ð¿ÑокÑÑÑка 676 var window_height = jQuery(window).height();
676 // вÑÑоÑа окна бÑаÑзеÑа 677 var height_page = jQuery('body').height(); // длина докÑменÑа вÑего 678 679 // еÑли ÑекÑÑÐ°Ñ Ð¿ÑокÑÑÑка и вÑоÑа окна бÑаÑзеÑа бол ÑÑе или Ñавна вÑоÑе докÑменÑа вÑего Ñо Ð¼Ñ Ð² Ñамом конÑе ÑледоваÑелÑно нÑжно подгÑÑзиÑÑ Ð½Ð¾Ð²ÑÑ Ð½Ð¾Ð²Ð¾ÑÑÑ Ð¸ еÑли ÑÑÐ¾Ñ ÑкÑÐ¸Ð¿Ñ ÐµÑе не вÑполнÑеÑÑÑ 680 if (((Number(current_scroll) + Number(window_height)) >= (height_page - 400)) && load_more_news_busy == 0) { 681 682 jQuery('.load_more_news').addClass('active'); 683 jQuery('#load_more_news_busy').val(1); // ÑÑавим в поле единиÑÑ ÑÑÐ¾Ð±Ñ ÑÑÐ¾Ñ ÑÑÐ¸Ð¿Ñ Ð½Ðµ иÑполнÑлÑÑ Ð¼Ð½Ð¾Ð³Ð¾ Ñаз 684 685 let nid = document.querySelector('.page-content.inside_page.active').getAttribute('data-id-article'); 686 if (typeof nid !== 'undefined') { 687 688 if (window['related_count'] === 2) { 689 window['related_parent'] = nid; 690 } 691 window['related_lock'] = true; 692 693 if (window['related_count'] === 2 || window['related_count'] === 3 || window['related_count'] === 4) { 694 nid = window['related_count']; 695 } 696 if (window['related_count'] === 5 && typeof window['related_parent'] !== 'undefined') { 697 nid = window['related_parent']; 698 } 699 700 let ajax = function (nid, recursion) { 701 702 $.ajax({ 703 type: 'GET', 704 url: '/api/1/related/renderList/' + nid + '/json', 705 success: function (data) { 706 707 if ((nid === 2 || nid === 3|| nid === 4) && data.length < 1) { 708 709 if (recursion) { 710 ajax(window['related_parent'], false); 711 } 712 713 } else { 714 715 let rid = Object.keys(data)[0]; 716 717 if ((nid === 2 || nid === 3 || nid === 4) && rid === window['related_parent']) { 718 719 if (recursion) { 720 ajax(window['related_parent'], false); 721 } 722 723 } else { 724 725 let resultRender = document.createElement('div'); 726 727 if (typeof data[rid] !== 'undefined') { 728 729 const getNewsLink = jQuery('.get_news_link'); 730 731 732 733 let getNewsLinkHtml = getNewsLink.length ? getNewsLink.prop("outerHTML") : ''; 734 735 let item = data[rid]; 736 737 if (nid !== 2 && nid !== 3 && nid !== 4) { 738 window['related_parent'] = rid; 739 } 740 741 resultRender.classList.add('page-content') 742 resultRender.classList.add('inside_page') 743 resultRender.classList.add('new_page') 744 745 // аÑÑибÑÑ Ñого, ÑÑо пеÑед нами ÑпеÑ: 746 // rubric === 0 && has_url === 1 747 const isSpecFrame = item.rubric === 0 && item.has_url === 1 748 749 resultRender.dataset.rubricArticle = item.rubric 750 resultRender.dataset.idArticle = item.nid 751 resultRender.dataset.url = window.location.origin + '' + item.alias 752 resultRender.dataset.specialContent = item.special 753 resultRender.dataset.authorString = item.author_string 754 resultRender.dataset.subjectString = item.subject_string 755 resultRender.dataset.hasUrl = item.has_url 756 757 if (isSpecFrame) { 758 const height = calc_window_height(); 759 const iframeCls = `class="spec-frame"`; 760 const html = item.render.replace(iframeCls, `${iframeCls} style="height: ${height}px"`); 761 762 resultRender.innerHTML = '' + 763 '<div class="block-container block-container_spec">' + 764 '<div class="clearfix"></div>' + 765 '<div class="block-container-margins first">' + 766 '<div class="clearfix"></div>' + 767 '<div>' + 768 '<div id="block-purple-content">' + 769 html + 770 '</div>' + 771 '</div>' + 772 '<div class="clearfix"></div>' + 773 '</div>' + 774 '<div class="clearfix"></div>' + 775 '<div class="epilog_page"></div>' + 776 '<div class="clearfix"></div>' + 777 '</div>' 778 ; 779 } else { 780 resultRender.innerHTML = '' + 781 '<div class="block-container">' + 782 '<div class="clearfix"></div>' + 783 '<div class="block-container-margins first">' + 784 '<div class="clearfix"></div>' + 785 '<div class="article_page__row">' + 786 '<div class="article_page__left">' + 787 '<div>' + 788 '<div id="block-purple-content">' + 789 item.render + 790 '</div>' + 791 '</div>' + 792 '</div>' + 793 '<div class="article_page__right"></div>' + 794 '</div>' + 795 '<div class="clearfix"></div>' + 796 '</div>' + 797 '<div class="clearfix"></div>' + 798 '<div data-partners-block-id="' + item.nid + '"></div>' + 799 getNewsLinkHtml + 800 '<div class="clearfix"></div>' + 801 '<div class="epilog_page">' + 802 '</div>' + 803 '<div class="clearfix"></div>' + 804 '</div>' 805 ; 806 } 807 808 window['related_count']++; 809 810 } 811 812 // вÑÑавлÑем пеÑед ÑÑÑеÑом новÑÑ ÑÑаÑÑÑ 813 jQuery('.footer').before(resultRender);
813 // data-url нÑжен, ÑÑÐ¾Ð±Ñ Ð¼ÐµÐ½ÑÑÑ url ÑÑÑаниÑÑ Ð² завиÑимоÑÑи Ð¾Ñ Ð¿ÑоÑмаÑÑиваемой ÑÑаÑÑи 814 check_shares_block(); 815 check_shares_block2(); 816 check_article_btns(); 817 jQuery('.load_more_news').removeClass('active'); 818 window['related_lock'] = false; 819 820 } 821 822 } 823 824 }, 825 error: function () { 826 jQuery('.load_more_news').removeClass('active'); 827 window['related_lock'] = false; 828 } 829 }); 830 } 831 ajax(nid, true); 832 833 } 834 835 // ÑÑÐ¾Ð±Ñ Ð½Ðµ гÑÑзилоÑÑ ÑÑÐ°Ð·Ñ Ð½ÐµÑколÑко ÑÑаÑей говоÑим ÑÑо ÑкÑÐ¸Ð¿Ñ Ñвободен ÑолÑко поÑле полной загÑÑзки новоÑÑи в ÐºÐ¾Ð½ÐµÑ ÑÑÑаниÑÑ - ÑÑо Ð¿Ð¾Ð·Ð²Ð¾Ð»Ð¸Ñ Ð¸Ð·Ð±ÐµÐ¶Ð°ÑÑ ÑлÑÑайнÑÑ Ð·Ð°Ð¿ÑоÑов на полÑÑение ÑледÑÑÑÐ¸Ñ ÑÑаÑей 836 setTimeout(function () { 837 jQuery('#load_more_news_busy').val(0); 838 }, 1000); 839 } 840 } 841 842 } 843 844 function calc_window_height() { 845 const winHeight = jQuery(window).height(); 846 const headerHeight = jQuery('#header .top-panel-inside__bottom').height(); 847 848 // ÑеÑили Ð´Ð»Ñ Ð°Ð¹ÑÑейма по ÑмолÑÐ°Ð½Ð¸Ñ Ð²ÑÑÑавлÑÑÑ Ð²ÑÑоÑÑ Ñвободного окна бÑаÑзеÑа, но не болÑÑе 1000px 849 return Math.min(winHeight - headerHeight, 1000); 850 } 851 852 /** 853 * 854 */ 855 function check_size_content() { 856 if (jQuery(window).width() <= 1200 && jQuery(window).width() > 1024) { 857 jQuery(".text-article__inside").css({"width": "auto"}).width(jQuery(window).width() - 70 - jQuery(".article_page__right").width() - 20 - 40); 858 } else if (jQuery(window).width() > 1200) { 859 jQuery(".text-article__inside").attr("style", ''); 860 } 861 } 862 863 /** 864 * 865 */ 866 function check_position_share_top() { 867 if (jQuery(window).width() > 767) { 868 if (jQuery(".text-article__share").length > 0 && jQuery(".page-content.inside_page.active .text-article").length > 0) { 869 870 var admin_toolbar = 0; 871 if (jQuery("#toolbar-item-administration-tray").length > 0) { 872 admin_toolbar = Number(jQuery("#toolbar-item-administration-tray").height()) + Number(jQuery("#toolbar-bar").height()); 873 } 874 875 var partner_before_head = 0; 876 if (jQuery(".partner_before_head").length > 0) { 877 partner_before_head = Number(jQuery(".partner_before_head").height()); 878 } 879 880 var mm_body2 = jQuery(".page-content.inside_page.active .text-article__share").css("margin-top"); 881 // if (block_share_top_margin != undefined) { 882 if (typeof block_share_top_margin !== 'undefined') { 883 var top_margin_share_btn = block_share_top_margin.replace("px", ""); 884 } else { 885 var top_margin_share_btn = 0; 886 } 887 888 // var top_margin_share_btn = jQuery(".page-content.inside_page.active .text-article__share").css("margin-top").replace("px", ""); 889 var total_top_margin = Number(jQuery(".top-panel-inside__bottom").height()) + Number(jQuery(".ticker").height()) + Number(admin_toolbar); 890 891 // if (jQuery(window).scrollTop() + total_top_margin >= jQuery(".page-content.inside_page.active .text-article").offset().top) { 892 // jQuery(".page-content.inside_page.active .text-article__share").addClass("scroll"); 893 // jQuery(".page-content.inside_page.active .text-article__share__inside").css({"top": Number(total_top_margin) + Number(top_margin_share_btn) + "px"}); 894 // } else { 895 // jQuery(".page-content.inside_page.active .text-article__share").removeClass("scroll"); 896 // } 897 898 //var article_height = Number(jQuery(".page-content.inside_page.active .text-article__inside").height()) + Number(jQuery(".page-content.inside_page.active .text-article__inside").offset().top); 899 //var left_share_height = Number(jQuery(window).scrollTop()) + Number(jQuery(".page-content.inside_page.active .text-article__share__list").height()) + total_top_margin + Number(top_margin_share_btn); 900 // if (Number(left_share_height) >= article_height) { 901 // jQuery(".page-content.inside_page.active .text-article__share__inside").addClass("stop"); 902 // } else { 903 // jQuery(".page-content.inside_page.active .text-article__share__inside").removeClass("stop"); 904 // } 905 906 // оÑклÑÑено
907 // if (jQuery(".article_page__right #mm-body").length > 0 && jQuery(window).width() >= 768 && jQuery("#block-purple-content").height() > jQuery(".article_page__right").height()) { 908 // var mm_body = jQuery(".article_page__right #mm-body"); 909 // var mm_body_parent = mm_body.parent(); 910 // var top_margin_mm_body = mm_body.css("margin-top").replace("px", ""); 911 // if (jQuery(window).scrollTop() + total_top_margin + Number(top_margin_mm_body) >= mm_body_parent.offset().top) { 912 // mm_body.addClass("scroll"); 913 // mm_body.css({ 914 // "top": Number(total_top_margin) + 20 + "px", 915 // "width": "" + mm_body_parent.width() - Number(mm_body.css("padding-left").replace("px", "")) * 2 + "" 916 // }); 917 // } else { 918 // mm_body.removeClass("scroll").css({"width": "auto"}); 919 // } 920 // 921 // var article_right_height = Number(jQuery(".article_page__right").outerHeight()) + Number(jQuery(".article_page__right").offset().top); 922 // var mm_body_height = Number(jQuery(window).scrollTop()) + Number(mm_body.outerHeight()) + total_top_margin + 20; 923 // if (Number(mm_body_height) >= article_right_height) { 924 // mm_body.addClass("stop"); 925 // } else { 926 // mm_body.removeClass("stop"); 927 // } 928 // } 929 930 if (jQuery(".page-content.inside_page.active .article_page__right #null").length > 0 && jQuery(window).width() >= 768 && jQuery(".page-content.inside_page.active #block-purple-content").height() > jQuery(".page-content.inside_page.active .article_page__right div:first-child").height()) { 931 932 var mm_body2 = jQuery(".page-content.inside_page.active .article_page__right #null .news_partners__inside__list"); 933 if (mm_body2.lenght) { 934 935 var mm_body_parent2 = mm_body2.parent(); 936 var top_margin_mm_body2 = mm_body2.css("margin-top").replace("px", ""); 937 if (jQuery(window).scrollTop() + total_top_margin + Number(top_margin_mm_body2) >= mm_body_parent2.offset().top) { 938 mm_body2.addClass("scroll"); 939 // mm_body2.css({"top": Number(total_top_margin) + 20 + "px", "width": "" + mm_body_parent2.width() - Number(mm_body2.css("padding-left").replace("px", ""))*2 + ""}); 940 mm_body2.css({ 941 "top": Number(total_top_margin) + 20 + "px", 942 "width": "" + mm_body_parent2.width() - Number(mm_body2.css("padding-left").replace("px", "")) * 2 - 2 + "" 943 }); 944 } else { 945 mm_body2.removeClass("scroll").css({"width": "auto"}); 946 } 947 948 var article_right_height2 = Number(jQuery(".page-content.inside_page.active .article_page__right").outerHeight()) + Number(jQuery(".page-content.inside_page.active .article_page__right").offset().top); 949 var mm_body_height2 = Number(jQuery(window).scrollTop()) + Number(mm_body2.outerHeight()) + total_top_margin + 20; 950 if (Number(mm_body_height2) >= article_right_height2) { 951 mm_body2.addClass("stop"); 952 } else { 953 mm_body2.removeClass("stop"); 954 } 955 956 } 957 958 } 959 960 } 961 } 962 } 963 964 /** 965 * 966 */ 967 function check_article_btns() { 968 jQuery(".text-article__inside").each(function () { 969 970 var current_article = jQuery(this); 971 var parent_block_article = current_article.parent().parent(); 972 973 if (current_article.find("u").length > 0) { 974 parent_block_article.find(".switch").addClass("show"); 975 } 976 977 var count_simbols = 0; 978 parent_block_article.find("p").each(function () { 979 count_simbols = Number(count_simbols) + Number(jQuery(this).text().length); 980 }); 981 var voice_text = parent_block_article.find(".voice_text"); 982 // if (count_simbols >= 5000) { 983 if (count_simbols >= 1050) { 984 // console.log('voice hide'); 985 voice_text.hide(); 986 } else { 987 //оÑклÑÑено 988 // voice_text.addClass('show_this_btn'); 989 // if (!voice_text.hasClass("collected_google_statistic")) { 990 // voice_text.addClass("collected_google_statistic"); 991 // jQuery(window).on('load', function () { 992 // yaCounter44834683.reachGoal('1'); 993 // }); 994 // } 995 } 996 997 }); 998 } 999 1000 jQuery(document).ready(function () { 1001 1002 if (after768() && !device.mobile()) { 1003 check_position_share_top(); 1004 } 1005 1006 check_article_btns(); 1007 // setInterval(function(){check_article_btns()}, 1500); 1008 1009 if (jQuery(".article_page__left .article_buttons_block").length > 0) { 1010 jQuery(".big_photo").addClass("with_buttons"); 1011 var control_buttons = jQuery(".article_page__left .article_buttons_block"); 1012 var control_buttons_height = Number(control_buttons.css("padding-top").replace("px", "")) + Number(control_buttons.css("margin-bottom").replace("px", "")) + Number(control_buttons.height()); 1013 jQuery(".article_page__left .text-article__share").css({"margin-top": (control_buttons_height - 20) + "px"}); 1014 } 1015 1016 // каÑÑа Ñ Ð¸Ð½ÑогÑаÑикой по ÑпоÑÑÐµÐ±Ð»ÐµÐ½Ð¸Ñ Ð°Ð»ÐºÐ¾Ð³Ð¾Ð»Ñ 1017 jQuery("body").on("mousemove", "svg .wine, svg .vodka, svg .beer", function (event) { 1018 var country_name = jQuery(this).attr("data-name"); 1019 var class_name = jQuery(this).attr("class"); 1020 jQuery(".alco_map_block__list__inside__items__item." + class_name).addClass("active"); 1021 1022 jQuery(".alco_map_block__map__inside__country_label").html(country_name).addClass("active").css({"top": event.pageY - jQuery(".alco_map_block__map").offset().top + "px"}).css({"left": Number(event.pageX) - jQuery(".alco_map_block__map").offset().left + 10 + "px"}); 1023 }); 1024 jQuery("body").on("mouseout", "svg .wine, svg .vodka, svg .beer", function () { 1025 jQuery(".alco_map_block__list__inside__items__item").removeClass("active"); 1026 jQuery(".alco_map_block__map__inside__country_label").removeClass("active"); 1027 }); 1028 jQuery("body").on("mousemove", ".alco_map_block__list__inside__items__item", function () { 1029 jQuery(".alco_map_block__map__inside").addClass(jQuery(this).attr("data-class-name")); 1030 }); 1031 jQuery("body").on("mouseout", ".alco_map_block__list__inside__items__item", function () { 1032 jQuery(".alco_map_block__map__inside").removeClass("wine").removeClass("vodka").removeClass("beer"); 1033 }); 1034 jQuery("body").on("click", ".alco_map_block__list__inside__items__item", function () { 1035 jQuery(".alco_map_block__list__inside__items__item__bottom").removeClass("active"); 1036 if (!jQuery(this).find(".alco_map_block__list__inside__items__item__bottom").hasClass("active")) { 1037 jQuery(this).find(".alco_map_block__list__inside__items__item__bottom").addClass("active"); 1038 } else { 1039 jQuery(this).find(".alco_map_block__list__inside__items__item__bottom").removeClass("active"); 1040 } 1041 }); 1042 1043 // пеÑеклÑÑаÑÐµÐ»Ñ Ð²ÑÐ´ÐµÐ»ÐµÐ½Ð¸Ñ ÑекÑÑа - авÑоÑекÑеÑаÑÑ 1044 jQuery("body").on("click", ".switch__btn", function () { 1045 if (jQuery(this).hasClass("on")) { 1046 jQuery(this).removeClass("on").addClass("off"); 1047 1048 jQuery(".page-content.active .text-article__inside").removeClass("show_main_strings"); 1049 } else { 1050 jQuery(this).removeClass("off").addClass("on"); 1051 jQuery(".page-content.active .text-article__inside").addClass("show_main_strings"); 1052 } 1053 }); 1054 1055 }); 1056 1057 jQuery("body").on("click", ".blockinfo--icon-block--btn", function () { 1058 var hidden_block_text = jQuery(this).parent().prev(); 1059 if (jQuery(this).hasClass("opened") == false) { 1060 jQuery(this).parent().parent().addClass("active"); 1061 jQuery(this).addClass("opened"); 1062 hidden_block_text.height(hidden_block_text.find(".blockinfo-hide-content-inside").height()); 1063 } else { 1064 jQuery(this).parent().parent().removeClass("active"); 1065 jQuery(this).removeClass("opened"); 1066 hidden_block_text.height(0); 1067 } 1068 }); 1069 1070 jQuery("body").on("click", ".blockinfo-title", function () { 1071 var hidden_block_text = jQuery(this).parent().find('.blockinfo-hide-content'); 1072 if (jQuery(this).parent().hasClass("active") == false) { 1073 jQuery(this).parent().addClass("active"); 1074 hidden_block_text.height(hidden_block_text.find(".blockinfo-hide-content-inside").height()); 1075 } else { 1076 jQuery(this).parent().removeClass("active"); 1077 hidden_block_text.height(0); 1078 } 1079 }); 1080 1081 /** 1082 * 1083 * @param voice_btn 1084 * @param time_btn 1085 */ 1086 function play_text_sound(voice_btn, time_btn) { 1087 voice_btn.removeClass('loading'); 1088 if (voice_btn.hasClass("active")) { 1089 voice_btn.removeClass("active"); 1090 voice_btn.find(".voice_text__label").text("ÐÑодолжиÑÑ"); 1091 // document.getElementById(time_btn).pause(); 1092 1093 jQuery('#' + time_btn)[0].pause(); 1094 ga('send', 'event', 'ÐзвÑÑка новоÑÑей ', 'ÐаÑза воÑпÑÐ¾Ð¸Ð·Ð²ÐµÐ´ÐµÐ½Ð¸Ñ (дейÑÑвие полÑзоваÑелÑ)', document.URL); 1095 //yaCounter44834683.reachGoal('3'); 1096 } else { 1097 voice_btn.addClass("active"); 1098 voice_btn.find(".voice_text__label").text("ÐзвÑÑиваеÑÑÑ..."); 1099 1100 // document.getElementById(time_btn).play(); 1101 jQuery('#' + time_btn)[0].play(); 1102 // document.getElementById(time_btn) 1103 document.getElementById(time_btn).onended = function () { 1104 voice_btn.removeClass("active"); 1105 voice_btn.find(".voice_text__label").text("ÐзвÑÑиÑÑ ÑекÑÑ"); 1106 ga('send', 'event', 'ÐзвÑÑка новоÑÑей ', 'ÐÑоÑлÑÑано до конÑа (ÑÑаÑÑÑ)', document.URL); 1107 //yaCounter44834683.reachGoal('4'); 1108 }; 1109 } 1110 } 1111 let reportedToYandex = { 1112 [location.href]: true 1113 }; 1114 /** 1115 * ÑÑнкÑÐ¸Ñ ÐºÐ¾ÑоÑÐ°Ñ Ð¼ÐµÐ½ÑÐµÑ title url и og аÑÑибÑÑÑ Ð² завиÑимоÑÑи Ñо ÑекÑÑей пÑоÑмаÑÑиваемой ÑÑаÑÑи пÑи беÑконеÑноÑй пÑокÑÑÑке 1116 * @param article_block 1117 */ 1118 function article_viewed(article_block) { 1119 1120 // еÑли наÑли новоÑÑÑ ÐºÐ¾ÑоÑÐ°Ñ Ð½Ð°Ñ Ð¾Ð´Ð¸ÑÑÑ Ð² облаÑÑи видимоÑÑи Ñо добавлÑем клаÑÑ Ðº ней ÑÑÐ¾Ð±Ñ Ð·Ð½Ð°ÑÑ ÑÑо полÑзоваÑÐµÐ»Ñ Ð²Ð¸Ð´Ð¸Ñ 1121 article_block.addClass('active'); 1122 1123 var data_rubric_article = article_block.attr('data-rubric-article'); 1124 // console.log('data_rubric_article ' + data_rubric_article); 1125 if (data_rubric_article != undefined && data_rubric_article != "undefined") { 1126 iz.rubric = article_block.attr('data-rubric-article'); 1127 } else { 1128 article_block.attr('data-rubric-article', iz.rubric); 1129 } 1130 1131 //console.log('article_viewed ' + iz.rubric); 1132 1133 var url_article = article_block.attr('data-url'); 1134 var id_article = article_block.attr('data-id-article'); 1135 1136 // Ñоздаем в локал storage ÑвойÑÑво коÑоÑое бÑÐ´ÐµÑ ÑодеÑжаÑÑ ÑпиÑок новоÑÑей коÑоÑÑе нÑжно игноÑиÑоваÑÑ Ð¾Ð½ бÑÐ´ÐµÑ Ð¿ÑÑÑÑм 1137 if (localStorage.infinity_scroll_articles_ignore_list == undefined) { 1138 var new_ignore_list = [id_article]; 1139 localStorage.setItem('infinity_scroll_articles_ignore_list', JSON.stringify(new_ignore_list)); 1140 } else { 1141 // полÑÑаем из локал storage ÑпиÑок новоÑÑей коÑоÑÑе нÑжно игноÑиÑоваÑÑ 1142 need_to_hide_article = false;
1143 var new_ignore_list = JSON.parse(localStorage.getItem('infinity_scroll_articles_ignore_list')); 1144 for (var p = 0; p < new_ignore_list.length; p++) { 1145 if (new_ignore_list[p] == id_article) need_to_hide_article = true; 1146 } 1147 if (!need_to_hide_article) { 1148 new_ignore_list.push(id_article); 1149 localStorage.setItem('infinity_scroll_articles_ignore_list', JSON.stringify(new_ignore_list)); 1150 // console.log('Ðбновил маÑÑив Ñ Ð¿ÑоÑмоÑÑеннÑми маÑеÑиалами'); 1151 } 1152 } 1153 1154 // еÑли ÑекÑÑий URL не ÑÐ¾Ñ ÐºÐ¾ÑоÑÑй Ñ Ð¿ÑоÑмаÑÑиваемой новоÑÑи Ñо менÑем его 1155 if (window.location.href != url_article) { 1156 1157 /*if (jQuery(window).width() > 767) { 1158 var need_to_put_partners = true; 1159 } else { 1160 var need_to_put_partners = true; 1161 }*/ 1162 /*if (need_to_put_partners) { 1163 //jQuery('.parter_block_right').remove(); // ÑдалÑем паÑнеÑÑкий ÑекламнÑй блок Ñак как он должен бÑÑÑ 1 на ÑÑÑаниÑе 1164 //jQuery('.article_page__right #null').remove(); 1165 }*/ 1166 1167 if (document.referrer != "https://iz.ru?autoscroll") { 1168 Object.defineProperty(document, "referrer", { 1169 get: function () { 1170 return "https://iz.ru?autoscroll"; 1171 } 1172 }); 1173 } 1174 1175 // кладем URL пÑоÑмаÑÑиваемой новоÑÑи в иÑÑоÑÐ¸Ñ Ð±ÑаÑзеÑа и он менÑеÑÑÑ Ð² адÑеÑной ÑÑÑоке 1176 window.history.pushState(null, null, url_article); 1177 1178 // менÑепм title ÑÑÑаниÑÑ 1179 var new_page_h1 = article_block.find('h1').text() 1180 var new_page_title = new_page_h1 + ' | ÐовоÑÑи | ÐзвеÑÑиÑ'; 1181 jQuery('title').text(new_page_title); 1182 1183 // менÑем паÑамеÑÑÑ meta на Ñе ÑÑо Ñ Ð¿ÑоÑмаÑÑиваемой новоÑÑи 1184 jQuery('meta[property="og:title"]').attr('content', new_page_title); 1185 jQuery('meta[name="title"]').attr('content', new_page_title); 1186 jQuery('meta[property="og:url"]').attr('content', url_article); 1187 1188 jQuery('link[rel="canonical"]').attr('href', url_article); 1189 jQuery('link[rel="revision"]').attr('href', url_article); 1190 var id_article = url_article.split('/'); 1191 jQuery('link[rel="shortlink"]').attr('href', window.location.origin + '/node/' + id_article[3]); 1192 1193 jQuery('meta[name="description"]').attr('content', article_block.find('.page_subtitle').text()); 1194 if (article_block.find('.page_subtitle').text() != '') { 1195 jQuery('meta[property="og:description"]').attr('content', article_block.find('.page_subtitle').text()); 1196 jQuery('meta[name="description"]').attr('content', article_block.find('.page_subtitle').text()); 1197 } else { 1198 jQuery('meta[property="og:description"]').attr('content', ""); 1199 jQuery('meta[name="description"]').attr('content', ''); 1200 } 1201 1202 // менÑем каÑÑÐ¸Ð½ÐºÑ Ð´Ð»Ñ ÑаÑÑаÑÐ¸Ð²Ð°Ð½Ð¸Ñ 1203 if (article_block.find('.big_photo__img img').attr('src')) { 1204 jQuery('meta[property="og:image"]').attr('content', window.location.origin + article_block.find('.big_photo__img img').attr('src')); 1205 } else { 1206 jQuery('meta[property="og:image"]').attr('content', ""); 1207 } 1208 // задаем авÑоÑа Ð´Ð»Ñ ÑаÑÑаÑÐ¸Ð²Ð°Ð½Ð¸Ñ 1209 if (article_block.find('.article_page__left__top__author').text() != '') { 1210 jQuery('meta[property="article:author"]').attr('content', article_block.find('.article_page__left__top__author').text()); 1211 } else { 1212 jQuery('meta[property="article:author"]').attr('content', ""); 1213 } 1214 // задаем вÑÐµÐ¼Ñ Ð´Ð»Ñ ÑаÑÑаÑÐ¸Ð²Ð°Ð½Ð¸Ñ 1215 if (article_block.find('time').length > 0) { 1216 jQuery('meta[property="article:published_time"]').attr('content', article_block.find('time').attr('datetime')); 1217 } else { 1218 jQuery('meta[property="article:published_time"]').attr('content', ""); 1219 } 1220 1221 if (article_block.find('.rubrics_btn a').eq(0).text() != '') { 1222 jQuery('meta[property="article:section"]').attr('content', article_block.find('.rubrics_btn a').eq(0).text() + ', СÑаÑÑÑ'); 1223 } else { 1224 jQuery('meta[property="article:section"]').attr('content', ""); 1225 } 1226 1227 window.yaParams = {}; 1228 var author_string = $('.page-content.inside_page.active').attr('data-author_string'); 1229 if (author_string != undefined && author_string != "undefined" && author_string != "" && author_string != 0) { 1230 window.yaParams.author = author_string; 1231 } 1232 1233 var subject_string = $('.page-content.inside_page.active').attr('data-subject_string'); 1234 if (subject_string != undefined && subject_string != "undefined" && subject_string != "" && subject_string != 0) { 1235 window.yaParams.subject = subject_string; 1236 } 1237 1238 var pageURL = url_article + '/?from=scroll'; 1239 var date = new Date(article_block.find('time').attr('datetime')) 1240 var dateFormatted = date.toLocaleDateString('ru-RU', {year: 'numeric', month: 'numeric', day: 'numeric'}) 1241 if (!reportedToYandex[url_article]) { 1242 reportedToYandex[url_article] = true; 1243 ym(44834683, 'hit', pageURL, { 1244 params: { 1245 title: new_page_h1.trim() + ' | ÐовоÑÑи | ÐзвеÑÑиÑ' + ' | ' + dateFormatted + ' | далее' 1246 } 1247 }); 1248 } 1249 // ÐºÐ¾Ð½ÐµÑ Ð¼ÐµÑÑики 1250 1251 // гÑгл ÑÑаÑиÑÑика 1252 window.dataLayer = window.dataLayer || []; 1253 if (typeof gtag === 'undefined') { 1254 function gtag(){dataLayer.push(arguments);} 1255 } 1256 gtag('js', new Date()); 1257 gtag('config', 'UA-100222249-1', { 1258 'page_location': location.href, 1259 'page_path': location.pathname 1260 }); 1261 // гÑгл ÑÑаÑиÑÑика ÐºÐ¾Ð½ÐµÑ 1262 1263 // меÑÑика onthe.io 1264 1265 var input_io = jQuery('.inside_page.active input[name="current_article_id"]'); 1266 if (input_io.length > 0) { 1267 1268 let dataOntheioAttr = input_io.attr('data-ontheio'); 1269 if (typeof dataOntheioAttr !== typeof undefined && dataOntheioAttr !== false) { 1270 1271 //console.log(dataOntheioAttr); 1272 var config_on_the_io = JSON.parse(dataOntheioAttr); 1273 1274 window._io_config = window._io_config || {}; 1275 window._io_config['0.2.0'] = window._io_config['0.2.0'] || []; 1276 window._io_config['0.2.0'].push(config_on_the_io); 1277 } 1278 } 1279 1280 // СÑÑÑÑик tns (iz_total) 1281 if (typeof window.tnsCounterIzTotal !== 'undefined') { 1282 window.tnsCounterIzTotal(); 1283 } 1284 1285 // СÑÑÑÑик tns на ÑÑбÑике ÑпоÑÑ Ð¸ на маÑеÑÐ¸Ð°Ð»Ð°Ñ Ñ ÑÑбÑикой ÑпоÑÑ (everest_sport) 1286 if (typeof window.tnsCounterEverestSport !== 'undefined') { 1287 window.tnsCounterEverestSport(); 1288 } 1289 1290 // СÑÑÑÑик tns (everest_network) 1291 if (typeof window.tnsCounterEverestNetwork !== 'undefined') { 1292 window.tnsCounterEverestNetwork(); 1293 } 1294 1295 // LiveInternet counter ÑÑеÑÑик 1296 new Image().src = "//counter.yadro.ru/hit;mic_izvestia?r" + 1297 escape(document.referrer) + ((typeof (screen) == "undefined") ? "" : 1298 ";s" + screen.width + "*" + screen.height + "*" + (screen.colorDepth ? 1299 screen.colorDepth : screen.pixelDepth)) + ";u" + escape(document.URL) + 1300 ";" + Math.random(); 1301 // LiveInternet counter ÑÑеÑÑик 1302 1303 // mail.ru ÑÑеÑÑик 1304 // var _tmr = window._tmr || (window._tmr = []); 1305 // _tmr.push({id: "2818", type: "pageView", start: (new Date()).getTime()}); 1306 // (function (d, w, id) { 1307 // if (d.getElementById(id)) return; 1308 // var ts = d.createElement("script"); 1309 // ts.type = "text/javascript"; 1310 // ts.async = true; 1311 // ts.id = id; 1312 // ts.src = (d.location.protocol == "https:" ? "https:" : "http:") + "//top-fwz1.mail.ru/js/code.js"; 1313 // var f = function () { 1314 // var s = d.getElementsByTagName("script")[0]; 1315 // s.parentNode.insertBefore(ts, s); 1316 // }; 1317 // if (w.opera == "[object Opera]") { 1318 // d.addEventListener("DOMContentLoaded", f, false); 1319 // } else { 1320 // f(); 1321 // } 1322 // })(document, window, "topmailru-code"); 1323 // mail.ru ÑÑеÑÑик 1324 1325 check_yadzen_epilog_list(); 1326 check_article_btns(); 1327 1328 } 1329 1330 setTimeout(function () { 1331 check_position_share_top(); 1332 }, 500); 1333 } 1334 1335 /** 1336 * 1337 */ 1338 function check_yadzen_epilog_list() { 1339 // ÐÐ°Ð½Ð½ÐµÑ ÑÐ±Ð¾ÐºÑ 1340 // var active_page = '.page-content.inside_page.active'; 1341 // var type_material = jQuery(active_page + ' input[name="type_material"]').val(); 1342 // 1343 // if (!jQuery('.page-content.inside_page.active .epilog_page .widget_container_13_07').length && type_material === 'news') { 1344 // // jQuery('.page-content.inside_page.active .epilog_page .new_inserted_block').length 1345 // jQuery('.page-content.inside_page.active .epilog_page .new_inserted_block').parent().parent().parent().before('<div class="margin-20-0"><div class="block-container-margins"><div class="widget_container_13_07"></div></div></div>'); 1346 // setTimeout(function () { 1347 // 1348 // (function (w, d, n) { 1349 // w[n] = w[n] || []; 1350 // w[n].push(function () { 1351 // w.YandexZen.renderWidget({ 1352 // clid: [630, 631], // иденÑиÑикаÑÐ¾Ñ Ð¿Ð°ÑÑнеÑа, должен бÑÑÑ Ð¿Ð¾Ð»ÑÑен в пÑнкÑе 2 1353 // container: '.page-content.inside_page.active .widget_container_13_07', // cелекÑÐ¾Ñ ÑлеменÑа или Ñам ÑлеменÑ, кÑда надо вÑÑавиÑÑ Ð²Ð¸Ð´Ð¶ÐµÑ 1354 // // version: 2, 1355 // successCallback: function () { // вÑзÑваеÑÑÑ Ð¿Ñи ÑÑпеÑной вÑÑавке виджеÑа 1356 // console.log('Ð²Ð¸Ð´Ð¶ÐµÑ Ð²ÑÑавлен ÑÑпеÑно'); 1357 // }, 1358 // failCallback: function () { // вÑзÑваеÑÑÑ Ð¿Ñи неÑÑпеÑной вÑÑавке виджеÑа 1359 // console.log('пÑоблема пÑи вÑÑаки виджеÑа, оÑÑеаÐ
1359³Ð¸ÑÑйÑе на нее'); 1360 // }, 1361 // }); 1362 // }); 1363 // t = d.getElementsByTagName("script")[0]; 1364 // s = d.createElement("script"); 1365 // s.src = "//zen.yandex.ru/widget-loader"; 1366 // s.async = true; 1367 // t.parentNode.insertBefore(s, t); 1368 // })(window, document, 'yandexZenAsyncCallbacks'); 1369 // 1370 // // (function(w, d, n) { 1371 // // w[n] = w[n] || []; 1372 // // w[n].push(function() { 1373 // // w.YandexZen.renderWidget({ 1374 // // clid: [630,631], // иденÑиÑикаÑÐ¾Ñ Ð¿Ð°ÑÑнеÑа, должен бÑÑÑ Ð¿Ð¾Ð»ÑÑен в пÑнкÑе 2 1375 // // container: '.page-content.inside_page.active .widget_container_13_07', // cелекÑÐ¾Ñ ÑлеменÑа или Ñам ÑлеменÑ, кÑда надо вÑÑавиÑÑ Ð²Ð¸Ð´Ð¶ÐµÑ 1376 // // successCallback: function () { // вÑзÑваеÑÑÑ Ð¿Ñи ÑÑпеÑной вÑÑавке виджеÑа 1377 // // console.log('Ð²Ð¸Ð´Ð¶ÐµÑ Ð²ÑÑавлен ÑÑпеÑно'); 1378 // // }, 1379 // // failCallback: function () { // вÑзÑваеÑÑÑ Ð¿Ñи неÑÑпеÑной вÑÑавке виджеÑа 1380 // // console.log('пÑоблема пÑи вÑÑаки виджеÑа, оÑÑеагиÑÑйÑе на нее'); 1381 // // }, 1382 // // }); 1383 // // }.bind(this)); 1384 // // t = d.getElementsByTagName("script")[0]; 1385 // // s = d.createElement("script"); 1386 // // s.src = "//zen.yandex.ru/widget-loader"; 1387 // // s.async = true; 1388 // // t.parentNode.insertBefore(s, t); 1389 // // })(window, document, 'yandexZenAsyncCallbacks'); 1390 // 1391 // 1392 // }, 1000); 1393 // } 1394 1395 // if (jQuery('.page-content.inside_page.active .epilog_page .our_banner_place3').length == 0) { 1396 // var count_our_banner_place3 = jQuery('.our_banner_place3').length; 1397 // 1398 // jQuery('.page-content.inside_page.active .epilog_page') 1399 // .append('<div class="margin-20-0"><div class="block-container-margins our_banner_place3" id="our_banner_place3_' + count_our_banner_place3 + '"><div class="our_banner_place3_adfox__inside" id="adfox_153208619014526817_nyw_' + count_our_banner_place3 + '"></div></div></div>'); 1400 // if (window.Ya && window.Ya.adfoxCode) { 1401 // window.Ya.adfoxCode.create({ 1402 // ownerId: 251899, 1403 // containerId: 'adfox_153208619014526817_nyw_' + count_our_banner_place3, 1404 // params: { 1405 // extid_tag: 'izvestia', 1406 // pp: 'nyv', 1407 // ps: 'cjyy', 1408 // p2: 'flxv', 1409 // puid8: puid8, 1410 // puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0', 1411 // extid: make_custom_id_user() 1412 // } 1413 // }); 1414 // } 1415 // // adUnits.push({ 1416 // // code: 'adfox_153208619014526817_nyw_' + count_our_banner_place3, 1417 // // bids: [{ 1418 // // bidder: 'criteo', 1419 // // params: { 1420 // // zoneid: 1213974, 1421 // // } 1422 // // }] 1423 // // }); 1424 // } else { 1425 // window.Ya.adfoxCode.reload(jQuery('.page-content.inside_page.active .our_banner_place3').attr('id')); 1426 // } 1427 1428 // if (jQuery('.page-content.inside_page.active .epilog_page .our_banner_place2').length == 0) { 1429 // var count_our_banner_place = jQuery('.our_banner_place2').length; 1430 // 1431 // jQuery('.page-content.inside_page.active .epilog_page') 1432 // .append('<div class="margin-20-0"><div class="block-container-margins our_banner_place2" id="our_banner_place2_' + count_our_banner_place + '"><div class="our_banner_place2_adfox__inside" id="adfox_153208619014526817_' + count_our_banner_place + '"></div></div></div>'); 1433 // if (window.Ya && window.Ya.adfoxCode) { 1434 // window.Ya.adfoxCode.create({ 1435 // ownerId: 251899, 1436 // containerId: 'adfox_153208619014526817_' + count_our_banner_place, 1437 // params: { 1438 // extid_tag: 'izvestia', 1439 // pp: 'nyw', 1440 // ps: 'cjyy', 1441 // p2: 'flxv', 1442 // puid8: puid8, 1443 // puid26: typeof window.iz !== 'undefined' && typeof window.iz.rubric !== 'undefined' && (window.iz.rubric === 14 || window.iz.rubric === '14') ? '1' : '0', 1444 // extid: make_custom_id_user() 1445 // } 1446 // }); 1447 // } 1448 // // adUnits.push({ 1449 // // code: 'adfox_153208619014526817_' + count_our_banner_place, 1450 // // bids: [{ 1451 // // bidder: 'criteo', 1452 // // params: { 1453 // // zoneid: 1213974, 1454 // // } 1455 // // }] 1456 // // }); 1457 // } else { 1458 // window.Ya.adfoxCode.reload(jQuery('.page-content.inside_page.active .our_banner_place2').attr('id')); 1459 // } 1460 1461 } 1462 1463 // inpage Ñеклама Ð¼ÐµÐ¶Ð´Ñ ÑÑÑоками
1464 // if (!jQuery('script[src="http://cdn01.nativeroll.tv/js/seedr-player.min.js"]').length) { 1465 // (function (a, b, c, d, e, f, g, h) { 1466 // g = b.createElement(c); 1467 // g.src = d; 1468 // g.type = "application/javascript"; 1469 // g.async = !0; 1470 // h = b.getElementsByTagName(c)[0]; 1471 // h.parentNode.insertBefore(g, h); 1472 // a[f] = []; 1473 // a[e] = function () { 1474 // a[f].push(Array.prototype.slice.apply(arguments)); 1475 // } 1476 // })(window, document, "script", (document.location.protocol === "https:" 1477 // ? "https:" : "http:") + "//cdn01.nativeroll.tv/js/seedr-player.min.js", "SeedrPlayer", 1478 // "seedrInit"); 1479 // 1480 // window.inpageSeedrPlayer = function (container) { 1481 // SeedrPlayer({ 1482 // container: container, 1483 // gid: '5b3266d59762b687308b4774', 1484 // article: '.text-article__inside', 1485 // onError: function (e) { 1486 // console.log(e); 1487 // } 1488 // }); 1489 // } 1490 // 1491 // } 1492 1493 jQuery(window).on("scroll", function () { 1494 if (after768() && !device.mobile() || 1 == 1) { 1495 // ÑмоÑÑим нÑжно ли загÑÑжаÑÑ ÑледÑÑÑÑÑ Ð½Ð¾Ð²Ð¾ÑÑÑ 1496 if (window.language === "ru"){ 1497 load_more_news(); 1498 } 1499 // пÑовеÑÑем позиÑÐ¸Ñ Ð±Ð»Ð¾ÐºÐ° поделиÑÑÑÑ Ð¸ ÑекламнÑÑ Ð±Ð»Ð¾ÐºÐµÐ¾Ð² ÑпÑава 1500 check_position_share_top(); 1501 } 1502 ; 1503 1504 }); 1505 1506 jQuery(window).on("resize", function () { 1507 check_size_content(); 1508 resize_block_spravka(); // изменÑем ÑазмеÑÑ Ð±Ð»Ð¾ÐºÐ° ÑпÑавка вÑÑаиваемого внÑÑÑÑ ÑÑаÑÑÑ Ð¸ оÑобÑажаÑÑего конÑÐµÐ½Ñ Ð´ÑÑгого маÑеÑиала 1509 if (after768() && !device.mobile() || 1 == 1) { 1510 check_position_share_top(); 1511 article_viewed(jQuery('.page-content.inside_page.active')); 1512 } 1513 }); 1514 1515 // jQuery('body').on('click', '.text-article__share, .share_bottom', function(){ 1516 1517 // jQuery.ajax({ 1518 // type: "GET", 1519 // url: "https://graph.facebook.com/v2.7/?id="+window.location.href+"&access_token=237252630166614|d1d744fb3dd0dca4144cbbf1fb74827d&fields=engagement{share_count}", 1520 // success: function(textResp) { 1521 // if (textResp.engagement != undefined && textResp.engagement != 'undefined' && textResp.engagement.share_count != undefined && textResp.engagement.share_count != 'undefined' && textResp.engagement.share_count > 0) { 1522 // if (jQuery('.page-content[data-url="'+window.location.href+'"] .text-article__share .social-likes__counter_facebook').length > 0) { 1523 // jQuery('.page-content[data-url="'+window.location.href+'"] .text-article__share .social-likes__counter_facebook').text(textResp.engagement.share_count); 1524 // } else { 1525 // jQuery('.page-content[data-url="'+window.location.href+'"] .text-article__share .social-likes__button_facebook').after('<span class="social-likes__counter social-likes__counter_facebook">'+textResp.engagement.share_count+'</span>'); 1526 // } 1527 1528 // if (jQuery('.page-content[data-url="'+window.location.href+'"] .share_bottom .social-likes__counter_facebook').length > 0) { 1529 // jQuery('.page-content[data-url="'+window.location.href+'"] .share_bottom .social-likes__counter_facebook').text(textResp.engagement.share_count); 1530 // } else { 1531 // jQuery('.page-content[data-url="'+window.location.href+'"] .share_bottom .social-likes__button_facebook').after('<span class="social-likes__counter social-likes__counter_facebook">'+textResp.engagement.share_count+'</span>'); 1532 // jQuery('.page-content[data-url="'+window.location.href+'"] .share_bottom .social-likes__button_facebook').addClass('full-counter'); 1533 // } 1534 // } 1535 // }, 1536 // error: function() { 1537 // } 1538 // }); 1539 1540 // }); 1541 1542 $('body').on('click', '.spec-button__to-next', function (e) { 1543 const siblingEl = $(e.target).closest('.page-content').next(); 1544 1545 if (siblingEl) { 1546 $('html, body').animate({ 1547 scrollTop: siblingEl.offset().top 1548 }, 300); 1549 } 1550 }); 1551 $('body').on('click', '.spec-button__open', function (e) { 1552 const url = $(e.target).data('url'); 1553 1554 window.open(url, '_blank'); 1555 }); 1556 1557})(jQuery);
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.