PageSourceSearch

https://floristics.info/templates/yoo_monday/js/ads-ua.js?78697

js floristics.info collected 2026-09-24 09:50:42 UTC 14,131 bytes, 303 lines download raw bytes

1var time = performance.now();
2var user = document.getElementById('userscountry');
3
4if (user) {
5	var userscountry = user.className;
6	console.log(userscountry);
7}
8			
9var wiW = window.innerWidth;
10
11	/*function runAds (elId, styleDisplay, styleW, styleH, adSlot, dataFormat, dataLayout, dataFullWidth, dataAlternateAd) {
12		
13		var el = document.getElementById(elId);
14		if (el) {
15
16			var g = document.createElement('ins');
17			g.className = "adsbygoogle bez-zaglushki";
18			g.style.display = styleDisplay;
19			if (styleW !== "none") { 
20				g.style.width = styleW+"px";
21			}
22			if (styleH !== "none") {
23				g.style.height = styleH+"px";
24			}
25			g.setAttribute("data-ad-client", "ca-pub-9809181476022567");
26			g.setAttribute("data-ad-slot", adSlot);
27			if (dataFormat !== "none") {
28				g.setAttribute("data-ad-format", dataFormat);
29			}
30			if (dataLayout !== "none") {
31				g.setAttribute("data-ad-layout", dataLayout);
32			}
33			if (dataFullWidth !== "none") {
34				g.setAttribute("data-full-width-responsive", dataFullWidth);
35			}
36			if (dataAlternateAd) {
37				g.setAttribute("data-alternate-ad-url", dataAlternateAd);
38			}
39			el.append(g);
40			(adsbygoogle = window.adsbygoogle || []).push({});
41				
42		}
43	}*/
44	
45	if((self.parent && !(self.parent===self)) && (self.parent.frames.length!=0)){ } else {
46		
47		if (wiW >= 960) {
48			/* Правая колонка под поиском */
49			runAds('yandex_rtb_R-A-137615-1', 'inline-block', '300', '600', '6158273932', 'none', 'none', 'none', 'https://floristics.info/files/zag/florium/zag-r-t.php' );
50			/* Правая колонка по центру */
51			runAds('google-right-middle', 'inline-block', '300', '600', '3477871134', 'none', 'none', 'none', 'https://floristics.info/files/zaglushka_google_300_600_quiz.php' );
52			/* Правая колонка по центру 2 */
53			runAds('google-right-middle2', 'inline-block', '300', '600', '8811650339', 'none', 'none', 'none', 'https://floristics.info/files/zaglushka_google_300_600_quiz.php' );
54			/* Правая колонка внизу */
55			runAds('google-right-bottom', 'inline-block', '300', '600', '8532082945', 'none', 'none', 'none', 'https://floristics.info/files/zaglushka_google_app2.html' );
56		}
57		
58	
59		/*runAds('google-middle-p1', 'block', 'none', 'none', '5008124185', 'auto', 'none', 'true', 'https://floristics.info/files/mg/mg1.html' );
60		runAds('google-middle-p7', 'block', 'none', 'none', '9724264249', 'auto', 'none', 'true', 'https://floristics.info/files/mg/mg6.html' );
61		runAds('google-middle-p14', 'block', 'none', 'none', '4059383335', 'auto', 'none', 'true', 'https://floristics.info/files/mg/mg12.html' );
62		runAds('google-middle-p21', 'block', 'none', 'none', '9060428570', 'auto', 'none', 'true', 'https://floristics.info/files/mg/mg18.html' );
63		runAds('google-middle-p28', 'block', 'none', 'none', '6336807281', 'auto', 'none', 'true', 'https://floristics.info/files/mg/mg24.html' );
64		runAds('google-middle-p35', 'block', 'none', 'none', '8517503093', 'auto', 'none', 'true', 'https://floristics.info/files/mg/mg30.html' );*/
65		runAds('google-middle-p1', 'block', 'none', 'none', '5008124185', 'auto', 'none', 'true' );
66		runAds('google-middle-p7', 'block', 'none', 'none', '9724264249', 'auto', 'none', 'true' );
67		runAds('google-middle-p14', 'block', 'none', 'none', '4059383335', 'auto', 'none', 'true' );
68		runAds('google-middle-p21', 'block', 'none', 'none', '9060428570', 'auto', 'none', 'true' );
69		runAds('google-middle-p28', 'block', 'none', 'none', '6336807281', 'auto', 'none', 'true' );
70		runAds('google-middle-p35', 'block', 'none', 'none', '8517503093', 'auto', 'none', 'true' );
71		runAds('google-middle-p42', 'block', 'none', 'none', '1345590086', 'auto', 'none', 'true' );
72		runAds('google-middle-p49', 'block', 'none', 'none', '6194592083', 'auto', 'none', 'true' );
73		runAds('google-middle-p56', 'block', 'none', 'none', '4656639854', 'auto', 'none', 'true' );
74		runAds('google-middle-p63', 'block', 'none', 'none', '8003900066', 'auto', 'none', 'true' );
75		runAds('google-middle-p70', 'block', 'none', 'none', '5516148154', 'auto', 'none', 'true' );
76		
77	//	runAds('yandex_rtb_R-A-137615-26', 'block', 'none', 'none', '6679588063', 'auto', 'none', 'true', 'https://floristics.info/files/mg/mg100.html' );
78		
79		/* После комментариев */
80		var comCount = document.querySelector('[data-com-count]');
81		if (comCount) {
82			var comments = comCount.getAttribute('data-com-count');
83		}
84		if (comments >= 3) {
85			runAds('yandex_rtb_R-A-137615-27_33', 'block', 'none', 'none', '9743886989', 'auto', 'none', 'true', 'https://floristics.info/files/mg/mg101.html' );
86		} else {
87			var afterComments = document.getElementById('yandex_rtb_R-A-137615-27_33');
88			if (afterComments) {afterComments.style.display = 'none';}
89		}
90	}
91	/* Убриаем отступ у блока VK для Украины */
92	//$("div.sevajcommod + div").css({"margin-top": "0"});
93	
94	//var mgBottom = $('.mgbhere');
95	var mgBottom = document.getElementsByClassName('mgbhere')[0];
96	var adb = document.getElementById('adb-aft-art');
97	var recreativMob = document.getElementById('bn_185jjIx2Sd');
98	var recreativPk = document.getElementById('bn_alaPmY7ZRv');
99	
100	//if (adb) {adb.style.display = "none";}
101	
102	if (mgBottom) {
103		
104		
105		var randomTen =  Math.random() * 10; // >=0 && <10
106		
107		/*if (userscountry == 'country-is-ua') {
108			if (randomTen <=2) {
109				var s = document.createElement("script");
110				s.src = "https://jsc.mgid.com/f/l/floristics.org.ua.1268595.js";
111				var head = document.getElementsByTagName('head')[0];
112				head.append(s);
113			} else {*/
114				if (wiW <= 720 && recreativMob) {
115					var recreativBlock = "185jjIx2Sd";
116					
117				} else if (wiW > 720 && recreativPk) {
118					var recreativBlock = "alaPmY7ZRv";
119				}
120				'use strict';(function(C,c,l){function n(){(e=e||c.getElementById("bn_"+l))?(e.innerHTML="",e.id="bn_"+p,m={act:"init",id:l,rnd:p,ms:q},(d=c.getElementById("rcMain"))?b=d.contentWindow:x(),b.rcMain?b.postMessage(m,r):b.rcBuf.push(m)):f("!bn")}function y(a,z,A,t){function u(){var g=z.createElement("script");g.type="text/javascript";g.src=a;g.onerror=function(){h++;5>h?setTimeout(u,10):f(h+"!"+a)};g.onload=function(){t&&t();h&&f(h+"!"+a)};A.appendChild(g)}var h=0;u()}function x(){try{d=c.createElement("iframe"),
121				d.style.setProperty("display","none","important"),d.id="rcMain",c.body.insertBefore(d,c.body.children[0]),b=d.contentWindow,k=b.document,k.open(),k.close(),v=k.body,Object.defineProperty(b,"rcBuf",{enumerable:!1,
121configurable:!1,writable:!1,value:[]}),y("https://go.rcvlink.com/static/main.js",k,v,function(){for(var a;b.rcBuf&&(a=b.rcBuf.shift());)b.postMessage(a,r)})}catch(a){w(a)}}function w(a){f(a.name+": "+a.message+"\t"+(a.stack?a.stack.replace(a.name+": "+a.message,""):""))}function f(a){console.error(a);(new Image).src=
122				"https://go.rcvlinks.com/err/?code="+l+"&ms="+((new Date).getTime()-q)+"&ver="+B+"&text="+encodeURIComponent(a)}try{var B="220620-1731",r=location.origin||location.protocol+"//"+location.hostname+(location.port?":"+location.port:""),e=c.getElementById("bn_"+l),p=Math.random().toString(36).substring(2,15),q=(new Date).getTime(),m,d,b,k,v;e?n():"loading"==c.readyState?c.addEventListener("DOMContentLoaded",n):f("!bn")}catch(a){w(a)}})(window,document,recreativBlock);
123		/*	}
124			
125		} else {
126			var s = document.createElement("script");
127			s.src = "https://jsc.mgid.com/f/l/floristics.org.ua.1268595.js";
128			var head = document.getElementsByTagName('head')[0];
129			head.append(s);
130		}  */
131		
132		/*if (adb) {
133			
134			var rn =  Math.floor(Math.random() * 6) + 1; // 1-3
135			
136			var gnScript = document.createElement("script");
137			gnScript.src = 'https://news.2xclick.ru/loader.js';
138			gnScript.async = true;
139			var gnBlock = document.createElement("div");
140			gnBlock.id = 'containerId307657';
141			
142			
143			
144			var luckyScript = document.createElement("script");
145			luckyScript.src = 'https://nztago.com/j3el17291livm0p3y0/h8q768uqv867/ypkguj5vl.php';
146			luckyScript.async = true;
147			var luckyDiv = document.createElement("div");
148			luckyDiv.setAttribute("data-la-block", "98e65990-fadd-4078-bef8-dbf4bae8929c");
149			
150			if (userscountry == 'country-is-by') {
151			
152				if (rn <= 3) {
153					
154					adb.append(gnScript);
155					adb.append(gnBlock);
156					(function(w, d, c, s, t){
157						w[c] = w[c] || [];
158						w[c].push(function(){
159							gnezdo.create({
160								tizerId: 307657,
161								containerId: 'containerId307657'
162							});
163						});
164					})(window, document, "gnezdoAsyncCallbacks");
165					
166				} else if (rn >= 4) {
167					
168					adb.append(luckyDiv);
169					adb.append(luckyScript);
170					
171				}
172				
173			} else if (userscountry == 'country-is-ua') {
174				
175				adb.append(gnScript);
176				adb.append(gnBlock);
177				(function(w, d, c, s, t){
178					w[c] = w[c] || [];
179					w[c].push(function(){
180						gnezdo.create({
181							tizerId: 307657,
182							containerId: 'containerId307657'
183						});
184					});
185				})(window, document, "gnezdoAsyncCallbacks");
186				
187			} else {
188			
189				adb.appendChild(gooIns);
190				(adsbygoogle = window.adsbygoogle || []).push({});
191
192			}
193		}*/
194		
195		var gooIns = document.createElement("ins");
196			gooIns.className = 'adsbygoogle';
197			gooIns.style.display = "block";
198			gooIns.setAttribute("data-ad-format", "autorelaxed");
199			gooIns.setAttribute("data-ad-client", "ca-pub-9809181476022567");
200			gooIns.setAttribute("data-ad-slot", "6487603107");
201			//gooIns.setAttribute("data-alternate-ad-url", "https://floristics.info/files/mg/mg102.html");
202			
203		if (adb) {
204				adb.appendChild(gooIns);
205				(adsbygoogle = window.adsbygoogle || []).push({});
206			}
207	}
208
209
210
211	// Создаем новый элемент script
212	var bodyElement = document.body;
213	
214	// Скрипт mgid тостер
215	var mgOverlay = document.createElement('script');
216	mgOverlay.async = true;
217	mgOverlay.src = 'https://jsc.mgid.com/f/l/floristics.org.ua.1281441.js';
218		
219	// Скрипт mgid межстраничный
220	var mgBetweenPages = document.createElement('script');
221	mgBetweenPages.async = true;
222	mgBetweenPages.src = 'https://jsc.mgid.com/f/l/floristics.org.ua.1281440.js';
223	bodyElement.appendChild(mgBetweenPages);
224
225	var randomInt = Math.floor(Math.random() * 2) + 1;
226	var showGoogle = false, showMgid   = false;
227	if (randomInt == 1) { showGoogle = true; } else if (randomInt == 2) {showMgid = true;}
228	
229	/* if (showGoogle) {*/
230		console.log('Будет сразу Google');
231		function handleAdsStatusChange(mutationsList, observer) {
232			for (var mutation of mutationsList) {
233				if (mutation.type === 'attributes' && mutation.attributeName === 'data-anchor-status') {
234					var newValue = mutation.target.getAttribute('data-anchor-status');
235					if (newValue === 'ready-to-display') {
236						console.log('Реклама google готова');
237					} else if (newValue === 'displayed') {
238						console.log('Реклама google отображается');
239					} else if (newValue === 'dismissed') {
240						console.log('Рекламу google закрыл пользователь');
241						setTimeout(function() {
242							console.log('Запускаем рекламу MG');
243							// Загружаем скрипт MGID overlay
244							bodyElement.appendChild(mgOverlay);
245							// Останавливаем отслеживание изменений и отключаем MutationObserver
246							observer.disconnect();
247						}, 10000); // Ждем 15 секунд перед выводом следующего сообщения
248					}
249				}
250			}
251		}
252
253		function observeDocument() {
254			// Находим элемент с атрибутом data-anchor-status
255			var targetElement = document.querySelector('ins[data-anchor-status]');
256			if (targetElement) {
257				// Если элемент уже существует, выводим сообщения и начинаем отслеживать его атрибуты
258				handleAdsStatusChange([{ type: 'attributes', attributeName: 'data-anchor-status', target: targetElement }]);
259
260				// Создаем новый экземпляр MutationObserver и передаем ему функцию обратного вызова
261				var observer = new MutationObserver(function(mutationsList) {
262					handleAdsStatusChange(mutationsList, observer);
263				});
264
265				// Опции для MutationObserver
266				var config = { attributes: true, attributeFilter: ['data-anchor-status'] };
267
268				// Начинаем отслеживание изменений внутри целевого элемента
269				observer.observe(targetElement, config);
270			} else {
271				// Если элемент не найден, ждем его появления и повторяем отслеживание
272				setTimeout(observeDocument, 100);
273			}
274		}
275		// Вызываем функцию для отслеживания появления элемента ins с атрибутом data-anchor-status
276		observeDocument();
277		
278/*	} else if (showMgid) {
279		
280		console.log('Будет сразу MG');
281		bodyElement.appendChild(mgOverlay);
282		
283		function findInsAnchor() {
284			// Находим элемент с атрибутом data-anchor-status
285			var targetElement = document.querySelector('ins[data-anchor-status]');
286			if (targetElement) {
287				// Если элемент уже существует, удаляем google ins и пишем об этом
288				targetElement.remove();
289				console.log('Рекламу google скрыли, загружаем MG');
290			} else {
291				// Если элемент не найден, ждем его появления и повторяем отслеживание
292				setTimeout(findInsAnchor, 10);
293			}
294		}
295		// Вызываем функцию для отслеживания появления элемента ins с атрибутом data-anchor-status
296		findInsAnchor();
297		
298				
299	}*/
300	
301
302time = performance.now() - time;
303console.log('Время выполнения = ', time);

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.