PageSourceSearch

https://starforge.info/sys-mini.js

js starforge.info collected 2026-10-02 12:21:33 UTC 5,077 bytes, 206 lines download raw bytes

1//   
2	if(jQuery("body").length) {
3		jQuery('<!-- Yandex.RTB --><script>window.yaContextCb=window.yaContextCb||[]</script><script src="https://yandex.ru/ads/system/context.js" async></script>').insertAfter(jQuery("body"));
4	}
5function getRandomArbitary(min, max) {
6	return Math.random() * (max - min) + min;
7}
8function isMobile() {
9    if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
10        return true; 
11    }
12	if(jQuery(window).width()<700)
13		return true; 
14    return false;
15}
16function isGoogle() {
17    if( /google/i.test(document.referrer) ) {
18        return true; 
19    }
20    return false;
21}
22
23function isToloka() {
24    if( /toloka/i.test(document.referrer) ) {
25        return true; 
26    }
27    return false;
28}
29
30 // 
31function get_cookie ( cookie_name )
32{
33  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );
34 
35  if ( results )
36    return ( unescape ( results[2] ) );
37  else
38    return null;
39}
40function set_cookie ( name, value, exp_y, exp_m, exp_d, path, domain, secure )
41{
42  var cookie_string = name + "=" + escape ( value );
43 
44  if ( exp_y )
45  {
46    var expires = cookie_date.getTime() + 24*3600*7;
47    cookie_string += "; expires=" + expires.toGMTString();
48  }
49 
50  if ( path ) 
51        cookie_string += "; path=" + escape ( path );
52 
53  if ( domain )
54        cookie_string += "; domain=" + escape ( domain );
55  
56  if ( secure )
57        cookie_string += "; secure";
58  
59  document.cookie = cookie_string;
60}
61var x = get_cookie ( "isPS" );
62//alert(x);
63function isPS() {
64    if( /google|yandex|bing|mail|rambler/i.test(document.referrer) || x == 1 ) {
65		
66		set_cookie ( "isPS", "1" );	
67
68        return true; 
69    }
70    return false;
71}
72
73if(!isToloka()/* &&  isPS()*/){
74 
75
76	// сайдбар   
77	if(jQuery(".wxsidebar").length  ) {
78		jQuery('<center><div id="yandex_rtb_R-A-18302756-1"></div></center>').insertAfter(jQuery(".wxsidebar"));
79
80 
81		function AdBangSideBar(){
82		//
83			window.yaContextCb.push(()=>{
84			  Ya.Context.AdvManager.render({
85				renderTo: 'yandex_rtb_R-A-18302756-1',
86				blockId: 'R-A-18302756-1'
87			  })
88			})
89	  
90		} 		
91		setTimeout(AdBangSideBar,1000*10);
92		AdBangSideBar();
93	}
94
95 
96	// начало контента  
97	if(jQuery("article").length) {
98		jQuery('<center style="margin-bottom:10px;"><div id="yandex_rtb_R-A-18302756-2"></div></center>').insertBefore(jQuery("article"));
99 
100		window.yaContextCb.push(()=>{
101		  Ya.Context.AdvManager.render({
102			renderTo: 'yandex_rtb_R-A-18302756-2',
103			blockId: 'R-A-18302756-2'
104		  })
105		})
106  
107	}	
108	// конец  контента  
109	if(jQuery("article").length) {
110		jQuery('<center><div id="yandex_rtb_R-A-18302756-3"></div></center>').insertAfter(jQuery("article"));
111 
112		window.yaContextCb.push(()=>{
113		  Ya.Context.AdvManager.render({
114			renderTo: 'yandex_rtb_R-A-18302756-3',
115			blockId: 'R-A-18302756-3'
116		  })
117		})
118  
119	} 
120
121  
122	 
123 	// перед комментами
124	if(jQuery("#respond").length) {
125		jQuery('<center><div id="yandex_rtb_R-A-18302756-4"></div></center>').insertBefore(jQuery("#respond"));
126		window.yaContextCb.push(()=>{
127		  Ya.Context.AdvManager.render({
128			renderTo: 'yandex_rtb_R-A-18302756-4',
129			blockId: 'R-A-18302756-4'
130		  })
131		})	} 	
132	  
133   
134
135//лента
136	jQuery('<div id="yandex_rtb_R-A-18302756-5"></div>').insertAfter(jQuery("body"));
137	 window.yaContextCb.push(()=>{
138	  Ya.Context.AdvManager.renderFeed({
139		renderTo: 'yandex_rtb_R-A-18302756-5',
140		blockId: 'R-A-18302756-5'
141	  })
142	});
143
144if(!isMobile()){
145	// pc
146 // фулскрин
147 window.yaContextCb.push(()=>{
148	Ya.Context.AdvManager.render({
149		"blockId": "R-A-18302756-6",
150		"type": "fullscreen",
151		"platform": "desktop"
152	})
153});
154 // флоор адв
155 window.yaContextCb.push(()=>{
156	Ya.Context.AdvManager.render({
157		"blockId": "R-A-18302756-7",
158		"type": "floorAd",
159		"platform": "desktop"
160	})
161});
162  	 
163 
164}else {
165	// mob
166window.yaContextCb.push(()=>{
167	Ya.Context.AdvManager.render({
168		"blockId": "R-A-18302756-8",
169		"type": "fullscreen",
170		"platform": "touch"
171	})
172});
173window.yaContextCb.push(()=>{
174	Ya.Context.AdvManager.render({
175		"blockId": "R-A-18302756-9",
176		"type": "floorAd",
177		"platform": "touch"
178	})
179}
179)
180 
181
182
183
184} 
185
186
187// хак со скрытием  - Размещение Floor Ad или Top Ad одновременно с Лентой
188const feed = document.getElementById('yandex_rtb_R-A-18302756-5'); // ID из поля renderTo
189const callback = (entries) => {
190        entries.forEach((entry) => {
191                if (entry.isIntersecting) {
192                        Ya.Context.AdvManager.destroy({ // скрытие Floor Ad
193                                        blockId: 'R-A-18302756-7'
194                                }), // blockId для мобильной версии
195                                Ya.Context.AdvManager.destroy({
196                                        blockId: 'R-A-18302756-9'
197                                }); // blockId для десктопной версии
198                }
199        });
200};
201const observer = new IntersectionObserver(callback, {
202        threshold: 0,
203});
204observer.observe(feed);
205
206 } 

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.