PageSourceSearch

https://polit74.ru/local/templates/polit74.ru/js/script.js?15862393963296

js polit74.ru collected 2026-10-02 06:16:43 UTC 3,296 bytes, 141 lines download raw bytes

1var is_mobile = false;
2
3$(document).ready(function () {
4  if ($(window).width() <= 768) {
5    is_mobile = true;
6  }
7
8  if (is_mobile) {
9
10    $('#burger_container .menu__button').on('click', function () {
11      $('body').toggleClass('menu-opened');
12      $('#sidebar').toggleClass('active');
13      $('#sidebar_overlay').toggleClass('active');
14      return false;
15    });
16
17    $('#sidebar').touchwipe({
18      wipeLeft: function () {
19        $('#sidebar').removeClass('active');
20        $('#sidebar_overlay').removeClass('active');
21        $('body').removeClass('menu-opened');
22      },
23      preventDefaultEvents: false
24    });
25
26    $('#sidebar_overlay').touchwipe({
27      wipeLeft: function () {
28        $('#sidebar').removeClass('active');
29        $('#sidebar_overlay').removeClass('active');
30        $('body').removeClass('menu-opened');
31      },
32      preventDefaultEvents: false
33    });
34
35    /*var slinky = $('#sidebar_menu_container').slinky({
36      label: 'назад',
37      title: true,
38      resize: true
39    });*/
40
41  }
42
43  $('.gallery-article--small .gallery-article__list').slick({
44    infinite: true,
45    slidesToShow: 4,
46    slidesToScroll: 1,
47    arrows: true,
48    asNavFor: '.gallery-article--big .gallery-article__list',
49    focusOnSelect: true,
50
51    responsive: [
52      {
53        breakpoint: 1024,
54        settings: {
55          slidesToShow: 3,
56          slidesToScroll: 3,
57        }
58      },
59      {
60        breakpoint: 600,
61        settings: {
62          slidesToShow: 2,
63          slidesToScroll: 2
64        }
65      },
66      {
67        breakpoint: 480,
68        settings: {
69          slidesToShow: 2,
70          slidesToScroll: 1
71        }
72      }
73    ]
74  });
75
76  $('.gallery-article--big .gallery-article__list').slick({
77    infinite: true,
78    slidesToShow: 1,
79    slidesToScroll: 1,
80    arrows: false,
81    dots: false,
82    asNavFor: '.gallery-article--small .gallery-article__list',
83  });
84
85
86  $('.header-nav__more').on('click', function () {
87    $(this).toggleClass('active');
88    $('.header-nav__sub').toggleClass('active');
89    return false;
90  });
91
92  window.onload = function () {
93    $('.page-snippet--left img, .page-snippet--right img').each(function (i, item) {
94
95      let width = $(item).width();
96      $(item).parents('.page-snippet').css('width', width + 'px');
97      console.log(width);
98    });
99  };
100
101  if (!is_mobile) {
102
103    $(window).scroll(function () {
104      if ($(this).scrollTop() > 150) {
105        $('.header').addClass('header--fixed');
106        $('body').css('padding-top', '131px');
107      } else {
108        $('.header').removeClass('header--fixed')
109        $('body').css('padding-top', '0');
110      }
111    });
112
113  }
114
115
116  $('.social__item a').on('click', function () {
117
118    var type = $(this).data('type');
119    if (type === undefined || type.length < 1) {
120      return true;
121    }
122
123    Share.go(this);
124
125    $.ajax({
126      url: window.location.href,
127      type: 'POST',
128      dataType: 'json',
129      data: {
130        action: 'setArticleShare',
131        sessid: BX.bitrix_sessid()
132      },
133      success: function (data) {
134        $('.share_count').html(data.count);
135        return false;
136      }
137    });
138
139    return false;
140  });
141});

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.