PageSourceSearch

https://www.sga23.ru/bitrix/templates/new.sga/components/bitrix/news.list/popup-promo/script.js

js sga23.ru collected 2026-10-07 23:24:59 UTC 1,661 bytes, 58 lines download raw bytes

1$(window).load(function () 
2{
3	var functions = [];
4	if($('div.js-popup-promo').length){
5			$('div.js-popup-promo').each(function() {
6				var interval = Number($(this).data('interval'));
7				var current = this;
8				tempFunction = function(){
9						if($('.modal.show').length){
10							if(functions.length){
11								[tempFunction, interval] = functions.pop();
12								setTimeout(tempFunction, interval * 1000);
13							}
14							return;
15						};
16						$.magnificPopup.open(
17						{
18							items: 
19							{
20							  src: '#' + $(current).attr('id')
21							},
22							type: 'inline',
23							callbacks: 
24							{
25								beforeOpen: function() 
26								{
27									this.st.mainClass = "mfp-zoom-out";
28								},
29								beforeClose: function() 
30								{
31									promosViewed = BX.getCookie('MAIN_POPUP');
32									if(promosViewed) {
33										promosViewedArray = JSON.parse(promosViewed);
34										promosViewedArray.push($(current).data('id'));
35									}
36									else promosViewedArray = [$(current).data('id')];
37									BX.setCookie('MAIN_POPUP', JSON.stringify(promosViewedArray), {expires: 86400000});
38									if(functions.length){
39										[tempFunction, interval] = functions.pop();
40										setTimeout(tempFunction, interval * 1000);
41									}
42								}
43							},
44							midClick: true
45						});
46					};
47				functions.push([tempFunction, interval]);
48			});
49			
50			
51			function sortByInterval(a, b) {
52				if (a[1] === b[1]) return 0;
53				else return (a[1] > b[1]) ? -1 : 1;
54			}
55			[tempFunction, interval] = functions.sort(sortByInterval).pop();
56			setTimeout(tempFunction, interval * 1000);
57	}
58});

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.