PageSourceSearch

https://sanpriboy.ru/wp-content/themes/sanpriboy/script.js?ver=7.1.2

js sanpriboy.ru collected 2026-10-05 00:06:37 UTC 5,968 bytes, 189 lines download raw bytes

1(function($) {
2$(document).ready(function()
3{
4	$('.popup-inline').magnificPopup({
5		type: 'inline',
6		mainClass: 'mfp-fade',
7		removalDelay: 300,
8		preloader: false,
9		fixedContentPos: true,
10	});
11});
12}(jQuery));
13
14/*
15                ['setContext', '.........', 'ru'],
16				['embed', 'search-form', {
17					container: 'tl-search-form',
18					onBookingStepChanged: bookingStepChanged,
19					onBookingSuccess: bookingSuccess,
20					onNoAvailableRooms: noAvailableRooms
21				}]
22*/
23
24function getCookie(name) {
25	var matches = document.cookie.match(new RegExp(
26		"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
27	));
28	return matches ? decodeURIComponent(matches[1]) : undefined;
29}
30
31function noAvailableRooms(data) {
32	var _utmipref = window.atob( getCookie('_utmipref') );
33	var array_utmipref = JSON.parse(_utmipref);
34	
35	yaCounter39030900.reachGoal('No_Available_Rooms', {
36		'URL-ref': array_utmipref['referer'],
37		'arrival_date': data.arrivalDate,
38		'departureDate': data.departureDate,
39		'guests': data.guests,
40		'language': data.language,
41		'now': data.now
42	});
43}
44
45function bookingStepChanged(data)
46{
47	switch (data.step) {
48		case 'search': // Посещение страницы "Номера"
49		case 'preview': // Посещение страницы "Заказ услуг"
50		case 'payment': // Посещение страницы "Данные о госте и выбор способа оплаты"
51		case 'complete': // Квитанция сформирована. Бронь завершена.
52			break;
53		default:
54			return;
55	}
56	yaCounter39030900.hit('/' + data.step);
57};
58
59function bookingSuccess(data) {
60
61	var result = list_data(data);
62	var about_bookingroom = "";
63	var roomTypes = "\n";
64	
65	var count_roomTypes = 0;
66	
67	for(var i in data.roomTypes)
68	{
69		if (data.roomTypes.hasOwnProperty(i))
70		{
71			var bookingroom = 0;
72			var list_roomTypes = (++count_roomTypes) + ". roomTypes:" + "\n" + list_data(data.roomTypes[i]);
73		
74			switch(data.roomTypes[i].id)
75			{
76				/*
77				case '37515':
78					roomTypes += ' Путёвка «Санаторно-куротное лечение»';
79					bookingroom = 'treatment';
80				break;
81				case '37515':
82					roomTypes += ' Путёвка «Оздоровление»';
83					bookingroom = 'recovery';
84				break;
85				case '37515':
86					roomTypes += ' Корпус 8';
87					bookingroom = 'korpus-8';
88				break;
89				case '38259':
90					roomTypes += ' Комфорт 10';
91					bookingroom = 'korpus-10';
92				break;
93				case '37517':
94					roomTypes += ' Корпус 12';
95					bookingroom = 'korpus-12';
96				break;
97				case '37518':
98					roomTypes += ' Корпус 13';
99					bookingroom = 'korpus-13';
100				break;
101				case '37519':
102					roomTypes += ' Корпус 14';
103					bookingroom = 'korpus-14';
104				break;
105				case '37520':
106					roomTypes += ' Корпус 15';
107					bookingroom = 'korpus-15';
108				break;
109				*/
110				default:
111					roomTypes += ' id='+data.roomTypes[i].id;
112			}
113
114			if(bookingroom)
115			{
116				roomTypes += "\n";
117				yaCounter39030900.reachGoal('bookingroom_'+bookingroom);
118			}
119			
120			var list_roomTypes_guests = ""; // Данные на кого бронь
121			
122			for(var j in data.roomTypes[i].guests)
123			{
124				if (data.roomTypes[i].guests.hasOwnProperty(j))
125					list_roomTypes_guests += "guests:" + "\n" + list_data(data.roomTypes[i].guests[j]);
126			}
127			
128			about_bookingroom += list_roomTypes + "\n" + list_roomTypes_guests + "\n\n";
129		}
130	}
131	
132	var yandexclientid = yaCounter39030900.getClientID();
133	var googleclientid = ga.getAll()[0].get('clientId');
134	
135	var _utmipref = window.atob( getCookie('_utmipref') );
136	var array_utmipref = JSON.parse(_utmipref);
137
138	var utm_source = array_utmipref['utm_source']; // Источник кампании
139	var utm_medium = array_utmipref['utm_medium']; // Канал кампании
140	var utm_term = array_utmipref['utm_term']; // Ключевое слово в кампании
141	var utm_campaign = array_utmipref['utm_campaign']; // Название кампании
142	var utm_content = array_utmipref['utm_content']; // Содержание кампании
143	var ip = array_utmipref['ip']; // IP адрес
144	var referer = array_utmipref['referer']; // Referer
145
146	var text_referrer = "";
147	
148	if(utm_source) text_referrer += "Источник кампании: " + utm_source + "\n";
149	if(utm_medium) text_referrer += "Канал кампании: " + utm_medium + "\n";
150	if(utm_term) text_referrer += "Ключевое слово в кампании: " + utm_term + "\n";
151	if(utm_campaign) text_referrer += "Название кампании: " + utm_campaign + "\n";
152	if(utm_content) text_referrer += "Содержание кампании: " + utm_content + "\n";
153	if(ip) text_referrer += "IP адрес: " + ip + "\n";
154	if(referer) text_referrer += "Referer: " + referer + "\n";
155
156	var text_to_push = 'bookingSuccess:' + roomTypes + "\n"
157						+ "YandexClientID = " + yandexclientid + "\n"
158						+ "GoogleClientID = " + googleclientid + "\n"
159						+ text_referrer + "\n"
160						+ result + "\n"
161						+ about_bookingroom;
162
163	jQuery.post("https://valler.net/push/", { 'user': 'openok', 'text': text_to_push });
164	jQuery.post("https://valler.net/push/email/", { 'user' : 'openok', 'message' : text_to_push } );
165	
166	var mess = '<b>Новая Bron_Travelline</b><br>-<br>'+text_to_push;
167	jQuery.post("https://api.valler.net/telegram/", { 'mess': mess, 'check': 'P6X;Ln5yicEk27%%(PS%-8b5', 'project': window.location.host });
168	
169	yaCounter39030900.userParams({
170		'utm_source': utm_source,
171		'utm_medium': utm_medium,
172		'utm_term': utm_term,
173		'utm_campaign': utm_campaign,
174		'utm_content': utm_content,
175		'ip': ip,
176		'referer': referer,
177		'ID_bookingNumber': data.bookingNumber,
178		'Yandex_ClientID': yandexclientid,
179		'Google_ClientID': googleclientid
180	});
181
182	yaCounter39030900.reachGoal('Bron_Travelline', {
183		'URL-ref': referer,
184		'order_id': data.bookingNumber,
185		'order_price': data.price,
186		'currency': data.currency,
187		'room_type': data.roomTypes[0].id
188	});
189};

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.