PageSourceSearch

https://pioner-cinema.ru/application/data/js/get_app.js?_=1732657551

js pioner-cinema.ru collected 2026-09-24 19:00:04 UTC 3,389 bytes, 139 lines download raw bytes

1// Функция создания куки
2function createCookie(name, value, days) {
3    var expires = "", date = new Date();
4    if (days) {
5        date.setTime(date.getTime()+(days*86400000));
6        expires = "; expires="+date.toGMTString();
7    }
8    document.cookie = name+"="+value+expires+"; path=/";
9}
10
11
12// Функция получения куки
13function getCookie(name) {
14    var value = "; " + document.cookie,
15        parts = value.split("; " + name + "=");
16    if (parts.length == 2) return parts.pop().split(";").shift();
17}
18
19
20
21
22$(document).ready(function () {
23	
24	let isBannerVisible = true;
25	
26	// смещаем брендирование и все слои на 78px
27	function GetAppBannerInit(){
28		// для desktop сразу удаляем 
29		if ($(window).width() > 768 ){
30			$('.top_get_app_wrap').remove();
31			return;			
32		}
33		
34		// появление баннера 
35		$('.top_get_app_wrap').animate({top: '+=78px'});
36		
37		// смещение других слоев 
38// 		$('.top_fixed_line').animate({top: '+=78'});
39		$('.header').animate({top: '+=78'});
40		// $('.top_fixed_line').animate({backgroundPositionY: '+=78'});
41		// $('.main_content.mt-branding').animate({marginTop: '+=78'});
42
43
44		// при скролле следим за шапкой, чтобы убрать доп смещение когда надо 
45		$(window).scroll(function () {
46			// console.log('$(document).scrollTop(): ', $(document).scrollTop()); 
47
48			if (isBannerVisible) { 
49				if ($(document).scrollTop() >= 78) { 
50					$('.header').css('top', "0");
51				} else {
52					$('.header').css('top', "78px");
53					// $('.top_fixed_line').removeClass('fixed').css('top', "78px");;
54				}
55	
56			}
57
58			// return;
59			// как только есть класс mobile_fix - убираем inline style 
60			// $('.the_best_header').hasClass('mobile_fix').css('top', 'unset');
61		});
62		
63		
64	}
65	
66	
67    // скачать
68	$(document).on("click", ".get_app_button", function (e) {
69		
70		// ставим куку на неделю 
71		createCookie("k_bannergetapp", "1", 7);
72    	
73    	if (isMobile.iOS()) {
74    		window.location = 'https://itunes.apple.com/ru/app/id6479616028';
75    		
76    	}
77    	else  {
78    		window.location = 'https://play.google.com/store/apps/details?id=ru.explosion.pioneer.pioneer';
79    	}
80
81    	
82	});
83	
84    // закрыть баннер 
85	$(document).on("click", ".get_app_cross", function (event) {
86
87		// ставим куку на день
88		createCookie("k_bannergetapp", "1", 1);
89
90		
91		isBannerVisible = false;
92		window.scrollPoint = 32;
93    	
94		$('.top_get_app_wrap').animate({ top: '-=78px' });
95		
96		$('.content').animate({marginTop : '24px'});
97		
98
99		
100		// смещение других слоев 
101// 		$('.top_fixed_line').animate({ top: '-=78' }, function () {
102// 			$('.top_fixed_line').addClass('fixed').css('top', "");	
103// 		});
104
105		$('.header').animate({ top: '-=78' }, function () { 
106			$('.header').css('top', '' );
107		});
108		// $('.header.scroll .header__top').css({marginTop : '-2.5rem'});
109		$('.header.scroll .header__top').css({ marginTop: '-42px' });
110
111		
112
113
114		$('head').append(`
115		<style type="text/css">
116			.header.scroll {
117				top: 0;
118			}
119		</style>`);
120		
121
122
123
124		
125		
126    	
127    	// убираем смещение шапки в глоб объекте 
128    	// app.scrollObjects.mainMenuOffsetTop -= 78;
129    	
130	});
131	
132	
133
134	
135	GetAppBannerInit();
136
137    	
138    
139});

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.