PageSourceSearch

https://mayaksbor.ru/html/js/mayak.js?v=4129

js mayaksbor.ru collected 2026-10-02 05:20:02 UTC 13,063 bytes, 339 lines download raw bytes

1$(document).ready(function(){
2	if($("input").is(".next_news")){
3		var firstId=$('div.first-post').attr('id');
4		console.log("firstId= ",firstId);
5					var waypoint = new Waypoint({
6					  element: document.getElementById(firstId),
7					  handler: function(direction) {
8						console.log(direction);
9					  } //,
10					//offset: '25%'
11					});/**/
12					var waypoint2 = new Waypoint({
13					  element: document.getElementById(firstId),
14					  handler: function(direction) {
15						if (direction=='up')
16						{
17							var id2title=this.element.dataset.id;
18							var title=document.getElementById('h1-'+id2title).innerText;
19							history.pushState('', '', 'https://mayaksbor.ru'+this.element.dataset.url);
20							document.title=title;
21						}
22						},
23						offset: 'bottom-in-view'
24					});
25		var wdth=$(window).width();
26		console.log(`w=${wdth}`);
27		var inProgress2 = false;
28		var iq2=0;
29		var iqmax=6;
30		var nextId = $("input.next_news").eq(iq2).val();
31
32		var new_url='';
33		//var slider_height=$('.bx_slider_box').outerHeight(true)+100;
34		if (wdth<773)
35			var slider_height=$('.bx_slider_box_news').outerHeight(true)+2400;
36		else
37			var slider_height=$('.bx_slider_box_news').outerHeight(true)+635;
38
39		console.log(`slider_h=${slider_height}`)
40		/*var observer_options = {
41		    // root: document.querySelector('.box_conteyner_block'),
42		    rootMargin: '0px',
43		    // threshold: 1.0
44		}
45		var observer_callback = function(entries, observer) {
46			console.log("GOGO");
47		};
48
49		var observer = new IntersectionObserver(observer_callback, observer_options);
50
51		observer.observe(document.querySelector('.box_conteyner_block'));*/
52
53		$(window).scroll(function() {
54			//console.log($(window).scrollTop() + $(window).height(), $(document).height() - slider_height);
55			// if($(window).scrollTop() + $(window).height() >= $(document).height() - slider_height && !inProgress2 && iq2<iqmax) {
56			// box_conteyner_block
57			if($(window).scrollTop() + $(window).height() >= $(document).height() - slider_height && !inProgress2 && iq2<iqmax) {
58				var a=$(window).scrollTop() + $(window).height();
59				var b=$(document).height()- slider_height;
60				//alert('load '+a+' <> '+b);
61				inProgress2 = true;
62				//console.log($(window).scrollTop());
63				//nextId++;
64				console.log(45,nextId);
65				//$('.box_center_content').append('<hr>'+nextId+'hr>');
66				$.post('/include/2020/ajax/next_news.php', {id:nextId,iq:iq2}, function(data){
67					console.log(48,nextId);
68					var idAdded=nextId;
69					iq2++;
70					//$('.box_center_content').append(data);
71					$('#detail-block').append(data);
72					if (wdth<773)
73					{
74						$('.second-post').removeClass('second-post').addClass('first-post news-mobile');
75					}
76					var new_url=$('#news-item-'+nextId).data('url');
77					var title=$('#news-item-'+nextId+' h1.second_post_headling').text();
78					var new_id='30 news-item'+nextId;
79					console.log(`new_id=${new_id}`);
80
81					var waypoint = new Waypoint({
82					  element: document.getElementById('news-item-'+nextId),
83					  handler: function(direction) {
84						if (direction=='down')
85						{
86							console.log(direction, this.element.id, this.element.dataset.url);
87							var id2title=this.element.dataset.id;
88							var title=document.getElementById('h1-'+id2title).innerText;
89							history.pushState('', '', 'https://mayaksbor.ru'+this.element.dataset.url);
90							document.title=title;
91						}
92					  } 
93					});/**/
94					var waypoint2 = new Waypoint({
95					  element: document.getElementById('news-item-'+nextId),
96					  handler: function(direction) {
97						if (direction=='up')
98						{
99							console.log(direction, this.element.id, this.element.dataset.url);
100							var id2title=this.element.dataset.id;
101							var title=document.getElementById('h1-'+id2title).innerText;
102							history.pushState('', '', 'https://mayaksbor.ru'+this.element.dataset.url);
103							document.title=title;
104						}
105						},
106						offset: 'bottom-in-view'
107					});/* */
108					//добавляем баннеры adfox при подгрузке новости str13
109					//Временно заккомментированные баннеры
110					/*
111					const adfoxDiv = document.createElement("div");
112					adfoxDiv.id = `adfox_${nextId}`
113					adfoxDiv.classList.add("hidden-xs");
114					adfoxDiv.classList.add("header_row_adfox");
115					// adfoxDiv.style.maxWidth = `${document.querySelector('.box_conteyner_block').offsetWidth - 315}px`
116					const adfoxDivMobile = document.createElement("div");
117					adfoxDivMobile.id = `adfox_mobile_${nextId}`
118					adfoxDivMobile.classList.add("visible-xs");
119					adfoxDivMobile.classList.add("header_row_adfox");
120					adfoxDivMobile.style.marginBottom = '30px'
121
122					const needNews = document.getElementById(`news-item-${nextId}`)
123					const parentDiv = needNews.parentNode;
124					parentDiv.insertBefore(adfoxDiv, needNews);
125					parentDiv.insertBefore(adfoxDivMobile, needNews);
126					console.log("nextId= ",nextId);
127
128					window.Ya.adfoxCode.create({
129						ownerId: 326844,
130						containerId: `adfox_${nextId}`,
131						params: {pp: 'bbew', ps: 'dqax', p2: 'gwir'}
132					});
133					window.Ya.adfoxCode.create({
134						ownerId: 326844,
135						containerId: `adfox_mobile_${nextId}`,
136						params: {pp: 'i', ps: 'dqax', p2: 'gwiw'}
137					});
138					
139					*/
140					//---Временно заккомментированные баннеры
141					// /------
142					//history.pushState('', '', 'https://mayaksbor.ru'+new_url);
143					//document.title=title;
144					//console.log('top '+nextId+' '+$('#news-item-'+nextId).position().top);
145					nextId=$("input.next_news").eq(iq2).val();
146					//console.log(iq2+' next='+nextId);
147					inProgress2 = false;
148					//$('.hide__list__comment').click(function() {
149					$('#hidecomm'+idAdded).click(function() {
150						if ($(this).hasClass('hide__list__comment-open')) {
151							$('#bx-cat-soc-comments-blg_'+idAdded+' .comment__list_slide').slideUp();
152							$(this).text('Развернуть комментарии');
153							$(this).removeClass('hide__list__comment-open');
154						} else {
155							$('#bx-cat-soc-comments-blg_'+idAdded+' .comment__list_slide').slideDown();
156							$(this).text('Свернуть комментарии');
157							$(this).addClass('hide__list__comment-open');
158						}
159					});
160				});/* */
161				//inProgress2 = false;
162			}
163		}); 
164
165	}
166
167	/*$('#search_company span.icon__box_form_search_callboard').click(function(e){
168		e.preventDefault();
169		var query=$('#search_company').serialize();
170		//alert(query);
171		var qq=$('#search_company input[name="q"]').val();
172		console.log('qq '+qq);
173		//$('#search_company').submit();
174		console.log('qq2');
175	});
176	$('.cancelcomm').click(function () {
177		$('.add__comment__block').slideUp();
178	});
179	*/
180
181}); 
182
183function moreNews(nextIdd){
184	var current_section=$('#current_section').val();
185	$.post('/include/2020/ajax/next_news_ids.php', {id:nextIdd, sectid:current_section}, function(data){
186		$('#more'+nextIdd).remove();
187		var jsnRes=JSON.parse(data);
188		console.log(jsnRes[0]+' '+jsnRes[1]+' '+jsnRes[2]);
189		//$('#detail-block').append(data);
190		$.post('/include/2020/ajax/next_news2.php', {id:jsnRes[0],iq:0}, function(data){
191			console.log(jsnRes[0]);
192			var idAdded=jsnRes[0];
193			$('#detail-block').append(data);
194					var waypoint = new Waypoint({
195					  element: document.getElementById('news-item-'+jsnRes[0]),
196					  handler: function(direction) {
197						if (direction=='down')
198						{
199							console.log(direction, 'previous=null',this.element.id, this.element.dataset.url);
200							var id2title=this.element.dataset.id;
201							var title=document.getElementById('h1-'+id2title).innerText;
202							history.pushState('', '', 'https://mayaksbor.ru'+this.element.dataset.url);
203							document.title=title;
204						}
205					  } 
206					});/**/
207					var waypoint2 = new Waypoint({
208					  element: document.getElementById('news-item-'+jsnRes[0]),
209					  handler: function(direction) {
210						if (direction=='up')
211						{
212							console.log(direction, this.element.id, this.element.dataset.url);
213							var id2title=this.element.dataset.id;
214							var title=document.getElementById('h1-'+id2title).innerText;
215							history.pushState('', '', 'https://mayaksbor.ru'+this.element.dataset.url);
216							document.title=title;
217						}
218						},
219						offset: 'bottom-in-view'
220					});/**/
221
222			$('#hidecomm'+idAdded).click(function() {
223				if ($(this).hasClass('hide__list__comment-open')) {
224					$('#bx-cat-soc-comments-blg_'+idAdded+' .comment__list_slide').slideUp();
225					$(this).text('Развернуть комментарии');
226					$(this).removeClass('hide__list__comment-open');
227				} else {
228					$('#bx-cat-soc-comments-blg_'+idAdded+' .comment__list_slide').slideDown();
229					$(this).text('Свернуть комментарии');
230					$(this).addClass('hide__list__comment-open');
231				}
232			});
233			$.post('/include/2020/ajax/next_news2.php', {id:jsnRes[1],iq:1}, function(data1){
234				console.log(jsnRes[1]);
235				var idAdded=jsnRes[1];
236				$('#detail-block').append(data1);
237					var waypoint = new Waypoint({
238					  element: document.getElementById('news-item-'+jsnRes[1]),
239					  handler: function(direction) {
240						if (direction=='down')
241						{
242							console.log(direction, 'previous=null',this.element.id, this.element.dataset.url);
243							var id2title=this.element.dataset.id;
244							var title=document.getElementById('h1-'+id2title).innerText;
245							history.pushState('', '', 'https://mayaksbor.ru'+this.element.dataset.url);
246							document.title=title;
247						}
248					  } 
249					});/**/
250					var waypoint2 = new Waypoint({
251					  element: document.getElementById('news-item-'+jsnRes[1]),
252					  handler: function(direction) {
253						if (direction=='up')
254						{
255							console.log(direction, this.element.id, this.element.dataset.url);
256							var id2title=this.element.dataset.id;
257							var title=document.getElementById('h1-'+id2title).innerText;
258							history.pushState('', '', 'https://mayaksbor.ru'+this.element.dataset.url);
259							document.title=title;
260						}
261						},
262						offset: 'bottom-in-view'
263					});/**/
264				$('#hidecomm'+idAdded).click(function() {
265					if ($(this).hasClass('hide__list__comment-open')) {
266						$('#bx-cat-soc-comments-blg_'+idAdded+' .comment__list_slide').slideUp();
267						$(this).text('Развернуть комментарии');
268						$(this).removeClass('hide__list__comment-open');
269					} else {
270						$('#bx-cat-soc-comments-blg_'+idAdded+' .comment__list_slide').slideDown();
271						$(this).text('Свернуть комментарии');
272						$(this).addClass('hide__list__comment-open');
273					}
274				});
275				$.post('/include/2020/ajax/next_news2.php', {id:jsnRes[2],iq:2}, function(data2){
276					console.log(jsnRes[2]);
277					var idAdded=jsnRes[2];
278					$('#detail-block').append(data2);
279					var waypoint = new Waypoint({
280					  element: document.getElementById('news-item-'+jsnRes[2]),
281					  handler: function(direction) {
282						if (direction=='down')
283						{
284							console.log(direction, 'previous=null',this.element.id, this.element.dataset.url);
285							var id2title=this.element.dataset.id;
286							var title=document.getElementById('h1-'+id2title).innerText;
287							history.pushState('', '', 'https://mayaksbor.ru'+this.element.dataset.url);
288							document.title=title;
289						}
290					  } 
291					});/**/
292					var waypoint2 = new Waypoint({
293					  element: document.getElementById('news-item-'+jsnRes[2]),
294					  handler: function(direction) {
295						if (direction=='up')
296						{
297							console.log(direction, this.element.id, this.element.dataset.url);
298							var id2title=this.element.dataset.id;
299							var title=document.getElementById('h1-'+id2title).innerText;
300							history.pushState('', '', 'https://mayaksbor.ru'+this.element.dataset.url);
301							document.title=title;
302						}
303						},
304						offset: 'bottom-in-view'
305					});/**/
306					$('#hidecomm'+idAdded).click(function() {
307						if ($(this).hasClass('hide__list__comment-open')) {
308							$('#bx-cat-soc-comments-blg_'+idAdded+' .comment__list_slide').slideUp();
309							$(this).text('Развернуть комментарии');
310							$(this).removeClass('hide__list__comment-open');
311						} else {
312							$('#bx-cat-soc-comments-blg_'+idAdded+' .comment__list_slide').slideDown();
313							$(this).text('Свернуть комментарии');
314							$(this).addClass('hide__list__comment-open');
315						}
316					});
317				});/* */
318			});/* */
319		});/* */
320
321	});
322
323
324$('a.tt').click(function(){
325    $('#formreg').show();
326    $('a.tt').toggleClass('open close');
327});
328$(':not(#anything)').click(function (e) {
329    if (!$(e.target).closest('.tt.close').length && !$(e.target).closest('#formreg').length){
330        $('#formreg').hide();
331        $('a.tt').removeClass('close').addClass('open');
332    }
333});
334
335//location.reload();
336//console.log("reloaded");
337
338}
339

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.