PageSourceSearch

https://cdn.news-front.su/themes/fogone/js/main.js?ver=1.0.10

js news-front.su collected 2026-10-02 05:04:53 UTC 7,520 bytes, 252 lines download raw bytes

1jQuery(function ( $ ) {
2
3  var windowWidth = $(window).width();
4  var newWindowWidth = $(window).width();
5  var scrollTop = $(window).scrollTop();
6  var newScrollTop = $(window).scrollTop();
7
8  /*
9  $('.tv_toggle').on('click', function(){
10    $('.tv').css('height', 'auto');
11	  if($('.tv_content').css('opacity') == 0){
12            $('.tv_content').fadeIn();
13            $('.tv_content').animate({opacity: 1},'fast', function () {
14                $('.tv .list').css('height', $('#player').css("height"));
15                player.api("play");
16            });
17            //$("#player").css("height", $(".tv .player").height()+"px");
18
19        } else {
20            player.api("stop");
21            $('.tv_content').animate({opacity: 0});
22            $('.tv_content').fadeOut();
23        }
24        $('.tv .list').scrollTop($('.tv .list').scrollTop() + $(current).position().top
25            - $('.tv .list').height()/2 + $(current).height()/2);
26    });
27   */
28
29
30 
31
32  $(".show-search-field").on("click", function () {
33    $(this).parent().toggleClass("active");
34    setTimeout(function(){
35      $(".show-search-field").prop("type", "submit");
36    }, 500);
37  });
38
39
40  $(".show-header-menu").on("click", function () {
41    $(this).toggleClass("active");
42    $(this).parent(".header-menu-block").toggleClass("active");
43  });
44
45  $(".header-menu").on('mouseleave', function(){
46    setTimeout(function(){
47      $('.header-menu-block').removeClass('active');
48      $('.btn-header-menu').removeClass('active');
49    }, 700);
50  });
51
52  $(".actual-news-btn").on("click", function () {
53    $(this).parent(".actual-news-btns").find(".actual-news-btn").removeClass("active");
54    $(this).addClass("active");
55  })
56
57  $(document).ready(function () {
58    $('.select').niceSelect();
59	    });
60
61  var swiperNews = new Swiper('.slider-news-container', {
62    slidesPerView: 2,
63    /* spaceBetween: 35, */
64    navigation: {
65      nextEl: '.slider-news-next',
66      prevEl: '.slider-news-prev',
67    },
68  });
69
70
71  var swiper4article = new Swiper('.swiper-4article', {
72    slidesPerView: 1,
73    allowTouchMove: false,
74    simulateTouch: false,
75    noSwiping: true,
76    allowSwipeToNext: false,
77    allowSwipeToPrev: false,
78    pagination: {
79      el: '.swiper-pagination',
80    },
81    breakpoints: {
82      720: {
83        allowTouchMove: true,
84        simulateTouch: true,
85        noSwiping: false,
86        allowSwipeToNext: true,
87        allowSwipeToPrev: true
88      },
89    },
90  });
91
92  var swiperVideo = new Swiper('.swiper-video', {
93    slidesPerView: 1,
94    allowTouchMove: false,
95    simulateTouch: false,
96    noSwiping: true,
97    allowSwipeToNext: false,
98    allowSwipeToPrev: false,
99    pagination: {
100      el: '.swiper-pagination',
101    },
102    breakpoints: {
103      720: {
104        allowTouchMove: true,
105        simulateTouch: true,
106        noSwiping: false,
107        allowSwipeToNext: true,
108        allowSwipeToPrev: true
109      },
110    },
111  });
112
113  $(".btn-menu-list").on("click", function () {
114    $(this).toggleClass("active");
115  });
116
117  
118
119
120  $(window).on("resize", function () {
121    newWindowWidth = $(this).width();
122
123    if (windowWidth < 720 && newWindowWidth  >= 720) {
124      if ($(".swiper-4article").length > 0) {
125        swiper4article.slideTo(0, false, false);
126      }
127      if ($(".swiper-video").length > 0) {
128        swiperVideo.slideTo(0, false, false);
129      }
130    }
131    
132
133    windowWidth = $(this).width();
134
135  });
136
137  $(window).scroll(function () {
138    newScrollTop = $(this).scrollTop()
139
140    if (windowWidth < 992) {
141      if (newScrollTop < scrollTop) {
142        $("header").addClass("fixed anim-in")
143      } else {
144        $("header.fixed").removeClass("fixed anim-in")
145      }
146    }
147
148    scrollTop = $(this).scrollTop()
149  });
150
151});
152
153jQuery('document').ready(function () {
154  jQuery("body").on('click','.upPage',function(){
155        $("html, body").animate({ scrollTop: 0 }, 600);
156      });
157  window.addEventListener('scroll', function() {
158    if (document.querySelector('.header__middle').getBoundingClientRect().bottom < 0) {
159    $('.header__bottom').css('position','fixed');
160    $('.header__bottom').css('top','0px');
161    $('.header__bottom').css('width','100%');
162    $('.header__bottom').css('z-index','9999');
163    } else {
164    $('.header__bottom').css('position','static');
165    }
166  });
167  
168  window.addEventListener('DOMContentLoaded', (event) => {
169    var heigg = document.querySelector('.video-list').offsetHeight;
170    document.querySelector('.swiper-container').setAttribute('style','height: '+heigg+'px !important');
171  });
172
173  $( ".top-news__main" ).mouseenter(function() {
174    //$( ".video-yt-icon--big .icon" ).css('opacity','1');
175    $(this).children('.video-yt-icon--big').css('opacity','0.37');
176  });
177  $( ".top-news__main" ).mouseout(function() {
178    //$( ".video-yt-icon--big .icon" ).css('opacity','0.37');
179    $(this).children('.video-yt-icon--big').css('opacity','1');
180  });
181
182  $( ".article-link " ).mouseenter(function() {
183    //$( ".video-yt-icon--big .icon" ).css('opacity','1');
184    $(this).children().children('.video-yt-icon--big').css('opacity','0.37');
185  });
186  $( ".article-link " ).mouseout(function() {
187    //$( ".video-yt-icon--big .icon" ).css('opacity','0.37');
188    $(this).children().children('.video-yt-icon--big').css('opacity','1');
189  });
190});
191jQuery(document).ready(function($){
192  setDarkTheme(0);
193  $(".checkbox-ios__toggle").change(function() {
194    setDarkTheme(1);
195  });
196  //setTimeout(function(){ $('.plyr.plyr--full-ui.plyr--video.plyr--html5.plyr--fullscreen-enabled.plyr--pip-supported').click(); }, 3000);
197});
198function setDarkTheme(сchange) {
199  if ($('body').length > 0) {
200    if (сchange == 1) {
201      if (theme_white == false) {
202        theme_white = true;
203      } else {
204        theme_white = false;
205      }
206    }
207
208    if (theme_white == false) {
209      var ss = document.createElement("link");
210      ss.rel = "stylesheet";
211      ss.href = "//news-front.su/black.css?v=2";
212      ss.type = "text/css";
213      ss.id = "darktheme";
214      ss.media = "all";
215      document.getElementsByTagName("head")[0].appendChild(ss);
216      $('.header-logo img').attr("src","https://news-front.su/logo-nf.png");//https://news-front.su/wp-content/themes/newsfront/img/logowhite.png
217      $('.video-list__item img').css('background','white');
218      $('.content_rb.noinfscroll').css('background','#f3f5f70d');
219      $('#vesos').css('background','#0d1117');
220      //$('g').attr('stroke','#fff');
221      $('#trydark').css('color','#f0f6fc');
222      $('.code-block.code-block-8').css('opacity','0.7');
223      $('.smi2').css('opacity','0.7');
224      //$('.social-news-buttons').css('color','#f0f6fc');
225      if (!($('#toggle--daynight').checked)) {
226        $('#toggle--daynight').click;
227      }
228      Cookies.set('dark', 'da', Date.now()+31556926);
229      if (сchange == 1) {
230        $.get("/about/?theme_white=0", function( data ) {
231          console.log('session set dark');
232        });
233      }
234    } else {
235      $('.header-logo img').attr("src","https://news-front.su/logo-nf.png");
236      $('#trydark').css('color','black');
237      //$('g').attr('stroke','#000');
238      $('.code-block.code-block-8').css('opacity','1');
239      $('.smi2').css('opacity','1');
240      //$('.social-news-buttons').css('color','#455a64');
241      $('#darktheme').remove();
242      $('#darktheme').remove();
243      $('#darktheme').remove();
244      Cookies.set('dark', 'net', Date.now()+31556926);
245      if (сchange == 1) {
246        $.get("/about/?theme_white=1", function( data ) {
247          console.log('session set white');
248        });
249      }
250    }
251  };
252}

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.