PageSourceSearch

https://xn----8sbangqocjlfl2ajs.xn--p1ai/templates/coroba/js/2023script.js?08-10-2026-1stab

js xn----8sbangqocjlfl2ajs.xn--p1ai collected 2026-10-08 00:46:21 UTC 12,460 bytes, 528 lines download raw bytes

1var is_send = false;
2
3$(document).ready(() => {
4	$(".phone-mask").mask("+7 (999) 999-9999");
5
6	/**
7	 * cookie-confirm
8	 */
9
10	var cookieBtn = document.querySelector('.cookie-confirm .btn');
11	if (cookieBtn) {
12		cookieBtn.addEventListener('click', function (e) {
13			e.preventDefault();
14			document.cookie = "cookieConfirm=yes; max-age=" + 60 * 60 * 24 * 30 + "; path=/; secure";
15
16			var cookieEl = document.querySelector('.cookie-confirm');
17			if (cookieEl) {
18				cookieEl.style.display = 'none';
19			}
20		});
21	}
22
23	/**
24	 * HAMBURGER
25	 */
26	$('.menu-toggle-inner').on('click', (e) => {
27		e.preventDefault();
28		$('.adaptive-menu-toggle').toggleClass('adaptive-menu-toggle--open');
29		$('.headerNav_adaptive').toggleClass('header_opened');
30	});
31
32	//инста портфолио в устугах
33	$('.instaWorks__list').slick({
34		infinite: false,
35		arrows: false,
36		dots: true,
37		slidesToShow: 4,
38		autoplay: true,
39		responsive: [
40			{
41				breakpoint: 1000,
42				settings: {
43					slidesToShow: 3,
44				}
45			},
46			{
47				breakpoint: 767,
48				settings: {
49					slidesToShow: 2,
50				}
51			},
52		]
53	});
54
55	// чекбокс согласия политики
56	$('.agree .checkbox').on('click', function () {
57		$(this).toggleClass('active');
58	});
59
60	// кнопка вверх
61	// $(window).scroll(function () {
62	//     if ($(this).scrollTop() > 300) {
63	//         $('.up_btn').fadeIn();
64	//     } else {
65	//         $('.up_btn').fadeOut();
66	//     }
67	// });
68	// $('.up_btn').click(function () {
69	//     $('body,html').animate({
70	//         scrollTop: 0
71	//     }, 1000);
72	//     return false;
73	// });
74
75
76	//открыть закрыть список городов
77	$('.hide_city, .cities_list__wrapper div').bind('click', function () {
78		$('.cities_list').hide();
79		$('.ip_city').text($(this).text());
80
81		if ($(this).text() == 'Санкт-Петербург') {
82			setGeoIp('SPB', 1);
83		} else {
84			if ($(this).text() == 'Москва' || $(this).text() == 'Московская область') {
85				setGeoIp('MSK', 1);
86			} else {
87				setGeoIp($(this).text(), 1);
88			}
89		}
90	});
91
92	// открыть скрытый блок
93	$('.openHideBlock').on('click', function (e) {
94		e.preventDefault();
95
96		$(this).parents('.s_section').hide();
97		$('.hide__block').slideDown();
98	});
99
100
101	// скопировать ссылку в казино
102	$('.copy__link').on('click', function () {
103		var linkBuffer = "https://xn----8sbangqocjlfl2ajs.xn--p1ai" + $(this).prev().attr('href'),
104			thisTextBuffer = $(this).children(".copy__link__modal");
105
106		navigator.clipboard.writeText(linkBuffer)
107			.then(() => {
108				console.log('Скопировано');
109				thisTextBuffer.text("Скопировано").show();
110			})
111			.catch(error => {
112				console.error(`Текст не скопирован ${error}`);
113				thisTextBuffer.text(`Текст не скопирован ${error}`).show();
114			})
115
116		setTimeout(function(){
117			thisTextBuffer.hide();
118		}, 2000);
119	});
120
121
122
123	/**
124	 * Анимация ручки игрового автомата в разделе section.reg
125	 *
126	 * slotMachine {HTMLElement} Игровой автомат
127	 * activateButton {HTMLElement} Кнопка, к нажатию которой привязана анимация
128	 */
129	const slotMachine = document.getElementById('slot-machine');
130
131	if (slotMachine) {
132		const activateButton = document.getElementById('slot-machine_btn');
133
134		// Кейфреймы движения ручки игрового автомата
135		const keyframesHandleBall = [
136			{translate: "0 -100px"},
137			{translate: "12px 12px"},
138			{translate: "0 100px"},
139			{translate: "12px 12px"},
140			{translate: "0 -100px"},
141		];
142		const keyframesHandleLever = [
143			{rotate: "207deg", height: "100px"},
144			{rotate: "270deg", height: "40px"},
145			{rotate: "333deg", height: "100px"},
146			{rotate: "270deg", height: "40px"},
147			{rotate: "207deg", height: "100px"},
148		];
149		const keyframesTimings = {
150			duration: 800,
151			iterations: 1,
152		};
153
154		let isSlotMachineAnimating = false;
155
156		activateButton.addEventListener('click', animateSlotMachineHandle);
157
158		function animateSlotMachineHandle() {
159			if (isSlotMachineAnimating) {
160				return
161			}
162
163			isSlotMachineAnimating = true;
164
165			slotMachine.querySelector('.slot-machine__handle__lever').animate(keyframesHandleLever, keyframesTimings);
166			slotMachine.querySelector('.slot-machine__handle__ball').animate(keyframesHandleBall, keyframesTimings);
167			setTimeout(() => isSlotMachineAnimating = false, (keyframesTimings.duration + 50));
168
169		}
170	}
171
172	/**
173	 * Конец анимации
174	 */
175
176	$("[data-fancybox]").fancybox({
177		//опции
178		touch: false
179
180	});
181
182	$('.mk_usluga_item').on('click', function () {
183		const name = $(this).attr('data-name');
184		$('#form_reg input[name="data[new][usluga]"]').val(name);
185	})
186
187	/**
188	 * tooltip
189	 */
190
191	let timerId;
192	$('.haveSublist .soc-nav__link').on('click', function (e) {
193		e.preventDefault();
194		let toolWrapper = $(this).next();
195
196		if (timerId){
197			clearTimeout(timerId);
198		}
199		if (toolWrapper.hasClass('visible')){
200			toolWrapper.removeClass('visible');
201		} else {
202			toolWrapper.addClass('visible');
203			timerId = setTimeout(() => toolWrapper.removeClass('visible'), 2000);
204		}
205	});
206
207	if ( window.innerWidth > 1000 ) {
208		$('.haveSublist .soc-nav__link').on('mouseenter', function () {
209			$(this).next().addClass('visible');
210		});
211
212		$('.haveSublist .soc-nav__link').on('mouseleave', function () {
213			$(this).next().removeClass('visible');
214		});
215	}
216
217});
218
219
220//старое из шаблона /land_ru/js/custom_library.js
221
222function setGeoIp(geo, is_reload) {
223
224	if (!is_send) {
225
226		is_send = true;
227
228		jQuery.post('/udata://custom/setGeoIp/' + geo + '/', {}, function (data) {
229
230			is_send = false;
231
232			if (is_reload) {
233
234				location.reload();
235
236			} else {
237
238				$('.choose_geo').hide();
239
240			}
241
242		});
243
244	}
245
246}
247
248function sendCallForm(obj, form_id, type_error) {
249	var bool = true;
250
251	var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
252
253	var validate = jQuery('#' + form_id + '_validate').text();
254
255	var fields = validate.split(',');
256	var fLen = fields.length;
257
258	if (fLen > 0) {
259
260		for (var i = 0; i < fLen; i++) {
261			let formId = '#' + fields[i].trim().replace(/\r?\n/g, "");
262			var temp_value = jQuery(formId).val();
263
264			if (temp_value == "" || temp_value == undefined || temp_value == 'undefined') {
265
266				bool = false;
267
268				if (type_error == 1) {
269
270					jQuery(formId).css('border', 'solid 2px #ff0000');
271
272				} else {
273
274					jQuery(formId).css('border', 'solid 2px #ff0000');
275
276				}
277
278			} else {
279
280				if (fields[i].indexOf('email') != -1) {
281
282					if (!re.test(temp_value)) {
283
284						bool = false;
285
286						if (type_error == 1) {
287
288							jQuery(formId).css('border', 'solid 2px #ff0000');
289
290						} else {
291
292							jQuery(formId).css('border', 'solid 2px #ff0000');
293
294						}
295
296					} else {
297
298						if (type_error == 1) {
299
300							jQuery(formId).css('border', 'solid 1px #ccc4c4');
301
302						} else {
303
304							jQuery(formId).css('border', 'solid 1px #ccc4c4');
305
306						}
307
308					}
309
310				} else {
311
312					if (type_error == 1) {
313
314						jQuery(formId).css('border', 'solid 1px #ccc4c4');
315
316					} else {
317
318						jQuery(formId).css('border', 'solid 1px #ccc4c4');
319
320					}
321
322				}
323
324			}
325
326		}
327
328	}
329
330	if (!$('#' + form_id + '_agree').hasClass('active')) {
331
332		bool = false;
333		alert('Вы должны согласиться с Политикой конфиденциальности.');
334
335	}
336
337	if (bool) {
338
339		if (!is_send) {
340
341			is_send = true;
342
343			// Дизейблим кнопку
344			if (obj) {
345				obj.style.opacity = '0.5';
346				obj.style.pointerEvents = 'none';
347				obj.style.cursor = 'not-allowed';
348			}
349
350			jQuery.ajax({
351				type: 'POST',
352				url: '/udata/webforms/ajaxsend/',
353				data: new FormData(jQuery("#" + form_id)[0]),
354				processData: false,
355				contentType: false,
356				success: function (data) {
357
358					if (jQuery("success", data).length) {
359
360						ym(50771491, 'reachGoal', 'conn');
361
362						$.fancybox.open('<div class="message"><h2 class="popup__title">Спасибо!</h2><p class="popup__desc">Ваша заявка отправлена!</p></div>');
363
364						$('.bubble').fadeOut(300);
365
366					} else {
367
368						if (jQuery("error", data).length) {
369
370							var error_txt = jQuery("error", data).text();
371
372							alert(error_txt);
373
374						}
375
376					}
377				},
378				complete: function() {
379					// Энейблим кнопку
380					if (obj) {
381						obj.style.opacity = '1';
382						obj.style.pointerEvents = 'auto';
383						obj.style.cursor = 'pointer';
384					}
385					is_send = false;
386				}
387			});
388
389
390			// jQuery.post('/udata/webforms/ajaxsend/', jQuery("#" + form_id).serialize(), function(data){
391			//
392			//     is_send = false;
393			//
394			//     if(jQuery("success", data).length) {
395			//
396			//         ym(50771491,'reachGoal','conn');
397			//
398			//         //alert('Ваше сообщение успешно отправлено');
399			//
400			//         $.fancybox.open('<div class="message"><h2 class="popup__title">Спасибо!</h2><p class="popup__desc">Ваша заявка отправлена!</p></div>');
401			//
402			//         $('.bubble').fadeOut(300);
403			//
404			//     }
405			//     else {
406			//
407			//         if(jQuery("error", data).length) {
408			//
409			//             var error_txt = jQuery("error", data).text();
410			//
411			//             alert(error_txt);
412			//
413			//         }
414			//
415			//     }
416			//
417			// });
418
419		}
420
421	} else {
422
423		return false;
424
425	}
426
427}
428
429function sendCasinoForm(obj, form_id, type_error) {
430	var bool = true;
431	var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
432	var validate = jQuery('#' + form_id + '_validate').text();
433
434	var fields = validate.split(',');
435	var fLen = fields.length;
436
437	if (fLen > 0) {
438		for (var i = 0; i < fLen; i++) {
439			let formId = '#' + fields[i].trim().replace(/\r?\n/g, "");
440			var temp_value = jQuery(formId).val();
441			if (temp_value == "" || temp_value == undefined || temp_value == 'undefined') {
442				bool = false;
443				if (type_error == 1) {
444					jQuery(formId).css('border', 'solid 2px #ff0000');
445				} else {
446					jQuery(formId).css('border', 'solid 2px #ff0000');
447				}
448			} else {
449				if (fields[i].indexOf('email') != -1) {
450					if (!re.test(temp_value)) {
451						bool = false;
452						if (type_error == 1) {
453							jQuery(formId).css('border', 'solid 2px #ff0000');
454						} else {
455							jQuery(formId).css('border', 'solid 2px #ff0000');
456						}
457					} else {
458						if (type_error == 1) {
459							jQuery(formId).css('border', 'solid 1px #ccc4c4');
460						} else {
461							jQuery(formId).css('border', 'solid 1px #ccc4c4');
462						}
463					}
464				} else {
465					if (type_error == 1) {
466						jQuery(formId).css('border', 'solid 1px #ccc4c4');
467					} else {
468						jQuery(formId).css('border', 'solid 1px #ccc4c4');
469					}
470				}
471			}
472		}
473	}
474
475	if (!$('#' + form_id + '_agree').hasClass('active')) {
476		bool = false;
477		alert('Вы должны согласиться с Политикой конфиденциальности.');
478	}
479
480	const buttonText = ['Отправляем...', 'Проверяем...', 'Считаем...'];
481	let j = 1;
482
483	const changeText = () => {
484		$('#slot-machine_btn').text(buttonText[j])
485		j = buttonText.length === j ? 0 : j + 1
486	}
487
488
489	if (bool) {
490		if (!is_send) {
491			is_send = true;
492			const changeIntervalText = setInterval(changeText, 1000);
493			jQuery.ajax({
494				type: 'POST',
495				url: '/udata/webforms/casinosend/.json',
496				data: new FormData(jQuery("#" + form_id)[0]),
497				processData: false,
498				contentType: false,
499				success: function (data) {
500					is_send = false;
501					clearInterval(changeIntervalText);
502					$('#slot-machine_btn').text('Зарегистрироваться и начать зарабатывать')
503					if (data.success) {
504						$('.slot-machine__inner.slot-machine__inner_2 .slot-machine__prise__value span').text(data.promokod)
505						$('.slot-machine__inner.slot-machine__inner_1').hide()
506						$('.slot-machine__inner.slot-machine__inner_2').show()
507						ym(50771491, 'reachGoal', 'conn');
508						// $.fancybox.open('<div class="message"><h2 class="popup__title">Вы выиграли!</h2><p class="popup__desc">Ваш купон на скидку '+data.promokod+'!</p></div>');
509						// $('.bubble').fadeOut(300);
510					} else {
511						if (data.udata.error) {
512							var error_txt = data.udata.error;
513							alert(error_txt);
514						}
515
516					}
517
518				}
519			});
520		}
521
522	} else {
523
524		return false;
525
526	}
527
528}

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.