PageSourceSearch

https://tbk-systems.ru/t/v4385/images/js/site.addons.js

js tbk-systems.ru collected 2026-09-29 13:44:18 UTC 6,440 bytes, 193 lines download raw bytes

1;(function($) {
2	'use strict';
3	
4	$(function(){
5		
6		$('.city-popup-wrap').appendTo('body');
7		
8		$('.section--u-iytvmnrh4').addClass('dark')
9
10		$('.city-in .title-city').on('click', function(){
11			$('.city-popup-wrap').addClass('opened');
12			$('.block-city-first-load').hide();
13		})
14		$('.item-city').on('click', function(){
15			
16			var thisCity = $(this).text(),
17				work = $(this).data('work'),
18				adr = $(this).data('address'),
19				mail = $(this).data('mail'),
20				phone = $(this).data('phones'),
21				phone2 = $(this).data('phone2'),
22				phone3 = $(this).data('phone3');
23				
24			$('.city-in .title-city span').text(thisCity);
25			
26			/*if(work) {
27				$('.text--u-ijtg7nvcx span').text(work);
28				localStorage.setItem('work', work);
29			}*/
30			if(phone2) {
31				$('.text--u-i82rywamt span').text(work);
32				localStorage.setItem('phone2', phone2);
33			}
34			if(mail) {
35				$('.list--u-ik3o1ji41').html(mail);
36				$('.list--u-ij437aa1e').html(mail);
37				$('.list--u-i1v7t869a').html(mail);
38				$('.list--u-ij871z3eh').html(mail);
39				localStorage.setItem('mail', mail);
40			}
41			if(adr) {
42				$('.text--u-iis3nj2h9 span').html(adr);
43				$('.text--u-iyc0s4t18 span').html(adr);
44				$('.text--u-i9vlmadg9 span').html(adr);
45				$('.text--u-i78uysas4 span').html(adr);
46				localStorage.setItem('adr', adr);
47			}
48			
49			if(phone) {
50				$('.list--u-iimkbulot').html(phone);
51				/*$('.list--u-ig53od5b8').html(phone);
52				$('.list--u-ic68cvm21').html(phone);
53				*/
54				$('.list--u-i74zpm824').html(phone);
55				localStorage.setItem('phone', phone);
56			}
57			if(phone3) {
58				$('.list--u-ixck9b295').html(phone3);
59				localStorage.setItem('phone3', phone3);
60			}
61			$('.city-popup-wrap').removeClass('opened');
62			
63			$('.section-new').each(function(){
64				let title = $(this).data('title');
65				$('.section-new').removeClass('active');
66				if(thisCity == title) {
67					$(this).addClass('active');
68					let img = $(this).data('img');
69					
70					$('.section--u-iytvmnrh4').addClass('dark').html(img);
71					return false;
72				}
73			})
74			
75			localStorage.setItem('city_select', thisCity);
76			createCookie('city_select', thisCity);
77			
78			document.location.reload();
79		})
80		if (localStorage.getItem('city_select')){
81			var city = localStorage.getItem('city_select');
82			for(var i = 0; i<$('.item-city').length; i++){
83				if ($('.item-city').eq(i).text()==city){
84					// $('.item-city').eq(i).trigger('click');
85					
86					if(localStorage.getItem('phone2')) {
87						$('.text--u-i82rywamt span').text(localStorage.getItem('phone2'));
88					}
89					if(localStorage.getItem('mail')) {
90						$('.list--u-i1v7t869a').html(localStorage.getItem('mail'));
91						$('.list--u-ij437aa1e').html(localStorage.getItem('mail'));
92						$('.list--u-ik3o1ji41').html(localStorage.getItem('mail'));
93						$('.list--u-ij871z3eh').html(localStorage.getItem('mail'));
94					}
95					if(localStorage.getItem('adr')) {
96						$('.text--u-iis3nj2h9 span').html(localStorage.getItem('adr'));
97						$('.text--u-iyc0s4t18 span').html(localStorage.getItem('adr'));
98						$('.text--u-i9vlmadg9 span').html(localStorage.getItem('adr'));
99						$('.text--u-i78uysas4 span').html(localStorage.getItem('adr'));
100					}
101					
102					if(localStorage.getItem('phone')) {
103						$('.list--u-iimkbulot').html(localStorage.getItem('phone'));
104						/*$('.list--u-ig53od5b8').html(localStorage.getItem('phone'));
105						$('.list--u-ic68cvm21').html(localStorage.getItem('phone'));*/
106						$('.list--u-i74zpm824').html(localStorage.getItem('phone'));
107					}
108					if(localStorage.getItem('phone3')) {
109						$('.list--u-ixck9b295').html(localStorage.getItem('phone3'));
110					}
111					$('.section-new').each(function(){
112						let title = $(this).data('title');
113						$('.section-new').removeClass('active');
114						if(city == title) {
115							$(this).addClass('active');
116							let img = $(this).data('img');
117							
118							$('.section--u-iytvmnrh4').addClass('dark').html(img);
119							return false;
120						}
121					})
122				}
123			}
124			$('.city-in .title-city span').text(city);
125			
126		} else {
127			let region_name = $('.block-city-first-load').data('region'),
128				finded = false;
129			
130	        if ($('.block-city-first-load').data('city')){
131	        	var city_name = $('.block-city-first-load').data('city');
132	        } else {
133	        	var city_name = $('.item-city').eq(0).text();
134	        }
135	        $('.block-city-first-load .title-city2 span').text(city_name);
136	        $('.block-city-first-load').show();
137	        $('.city-yes').click(function(){
138	        	
139	        	for(var i = 0; i<$('.item-city').length; i++){
140	        		
141					if (city_name==$('.item-city').eq(i).text()){
142						$('.item-city').eq(i).trigger('click');
143						localStorage.setItem('city_select', city_name);
144						createCookie('city_select', city_name);
145	        			finded = true;
146	        			$('.city-in .title-city span').text(city_name);
147	        			console.log(1)
148	        			break;
149					} else if ( region_name == $('.item-city').eq(i).data('region') ) {
150						$('.item-city').eq(i).trigger('click');
151	        			localStorage.setItem('city_select',  $('.item-city').eq(i).text());
152	        			createCookie('city_select', $('.item-city').eq(i).text());
153	        			finded = true;
154	        			$('.city-in .title-city span').text($('.item-city').eq(i).text());
155	        			console.log(2)
156	        			break;
157					} else {
158						console.log(3)
159					}
160					
161				}
162				
163				if (!finded) {
164					$('.block-city-first-load').hide();
165		        	$('.item-city').eq(0).trigger('click');
166				}
167					
168	        	$('.block-city-first-load').hide();
169	        })
170	        $('.city-no').click(function(){
171	        	$('.block-city-first-load').hide();
172	        	$('.city-popup-wrap').addClass('opened');
173	        })
174		};
175		
176		$('.city-popup-close').on('click', function(){
177			$('.city-popup-wrap').removeClass('opened');
178		});
179		
180		$(document).click(function(event) {
181			if ($(event.target).closest(".city-no").length || $(event.target).closest(".title-city").length || $(event.target).closest(".city-popup-wrap-in").length) return;
182			$('.city-popup-wrap').removeClass('opened');
183		});
184        
185        $('html').on('keyup', function(event) {
186	        if (event.keyCode == 27) {
187	            $('.city-popup-wrap').removeClass('opened');
188	        }
189	    });
190		
191	});
192	
193})(jQuery);

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.