PageSourceSearch

https://telefonizator.ru/javascripts/menu.js

js telefonizator.ru collected 2026-10-08 14:19:22 UTC 6,974 bytes, 138 lines download raw bytes

1/*! device.js 0.1.61 */
2(function(){var a,b,c,d,e,f,g,h,i,j;a=window.device,window.device={},c=window.document.documentElement,j=window.navigator.userAgent.toLowerCase(),device.ios=function(){return device.iphone()||device.ipod()||device.ipad()},device.iphone=function(){return d("iphone")},device.ipod=function(){return d("ipod")},device.ipad=function(){return d("ipad")},device.android=function(){return d("android")},device.androidPhone=function(){return device.android()&&d("mobile")},device.androidTablet=function(){return device.android()&&!d("mobile")},device.blackberry=function(){return d("blackberry")||d("bb10")||d("rim")},device.blackberryPhone=function(){return device.blackberry()&&!d("tablet")},device.blackberryTablet=function(){return device.blackberry()&&d("tablet")},device.windows=function(){return d("windows")},device.windowsPhone=function(){return device.windows()&&d("phone")},device.windowsTablet=function(){return device.windows()&&d("touch")&&!device.windowsPhone()},device.fxos=function(){return(d("(mobile;")||d("(tablet;"))&&d("; rv:")},device.fxosPhone=function(){return device.fxos()&&d("mobile")},device.fxosTablet=function(){return device.fxos()&&d("tablet")},device.meego=function(){return d("meego")},device.cordova=function(){return window.cordova&&"file:"===location.protocol},device.nodeWebkit=function(){return"object"==typeof window.process},device.mobile=function(){return device.androidPhone()||device.iphone()||device.ipod()||device.windowsPhone()||device.blackberryPhone()||device.fxosPhone()||device.meego()},device.tablet=function(){return device.ipad()||device.androidTablet()||device.blackberryTablet()||device.windowsTablet()||device.fxosTablet()},device.desktop=function(){return!device.tablet()&&!device.mobile()},device.portrait=function(){return window.innerHeight/window.innerWidth>1},device.landscape=function(){return window.innerHeight/window.innerWidth<1},device.noConflict=function(){return window.device=a,this},d=function(a){return-1!==j.indexOf(a)},f=function(a){var b;return b=new RegExp(a,"i"),c.className.match(b)},b=function(a){return f(a)?void 0:c.className+=" "+a},h=function(a){return f(a)?c.className=c.className.replace(a,""):void 0},device.ios()?device.ipad()?b("ios ipad tablet"):device.iphone()?b("ios iphone mobile"):device.ipod()&&b("ios ipod mobile"):b(device.android()?device.androidTablet()?"android tablet":"android mobile":device.blackberry()?device.blackberryTablet()?"blackberry tablet":"blackberry mobile":device.windows()?device.windowsTablet()?"windows tablet":device.windowsPhone()?"windows mobile":"desktop":device.fxos()?device.fxosTablet()?"fxos tablet":"fxos mobile":device.meego()?"meego mobile":device.nodeWebkit()?"node-webkit":"desktop"),device.cordova()&&b("cordova"),e=function(){return device.landscape()?(h("portrait"),b("landscape")):(h("landscape"),b("portrait"))},i="onorientationchange"in window,g=i?"orientationchange":"resize",window.addEventListener?window.addEventListener(g,e,!1):window.attachEvent?window.attachEvent(g,e):window[g]=e,e()}).call(this);
3
4
5function onResponse(d) {  
6	eval('var obj = ' + d + ';');  
7	alert('Файл ' + obj.filename + (obj.success ? " " : " НЕ ") + "загружен.");  
8} 
9
10function chat(){
11	var chatSendText= jQuery("input[name=chat]").val();
12	if(chatSendText == '') return;
13	jQuery.ajax({
14		type: "POST",
15		url: "/lib/chat.php?type=send&sessionId=" + sessionId + "&chatMessageId=" + chatMessageId + "&user=user",
16		data: "message=" + "<b>Вы:</b> " + chatSendText + "<br />",
17		success: function(data){
18			if(data == 'empty') alert('Данные отправить не удалось, повторите позже!');
19			else {
20				jQuery("input[name='chat']").val("");
21				chatGetMessage();
22			}
23		}
24	});			
25}	
26
27function call(){
28    var callSendText= jQuery("input[name=call]").val();
29    if(callSendText == '') return;
30    
31    jQuery.ajax({
32	type: "POST",
33	url: "/lib/chat.php?type=send&sessionId=" + sessionId + "&chatMessageId=" + chatMessageId + "&user=user",
34	data: "message=" + "<b>Вы: запрос обратного звонка на номер: </b>" + callSendText + " <br />",
35	success: function(data){
36	    if(data == 'empty') alert('Данные отправить не удалось, повторите позже!');
37	    else {
38		jQuery("input[name='call']").val("Отправлено");
39		chatGetMessage();
40	    }
41	}
42    });
43}
44
45	
46var sessionId= "0";
47function chatInit(){
48	if( jQuery.cookie('atsexpressChatSessionId') ) {
49		sessionId= jQuery.cookie('atsexpressChatSessionId');
50	} else {
51		jQuery.cookie('atsexpressChatSessionId',sessionId, { expires: 10 });
52	}
53	chatGetMessage();
54}
55
56var chatMessageId= 0;
57function chatGetUser(){
58	jQuery.ajax({
59		url: "/lib/chat.php?type=getuser&sessionId=" + sessionId + "&chatMessageId=" + chatMessageId,
60		success: function(data){
61			if(data == 'empty') return;
62			else {
63				jQuery("#consult").attr({src: "/images/consult/" + data + ".jpg"});
64			}
65		}
66	});
67}
68
69function chatGetMessage(){
70	if( jQuery.cookie('kn_0') == "true" ){
71		jQuery.ajax({
72			url: "/lib/chat.php?type=get&sessionId=" + sessionId + "&chatMessageId=" + chatMessageId,
73			success: function(data){
74				if(data == 'empty') return;
75				else {
76					chatMessageId++;
77					jQuery(".knopikWindow").append(data);
78					var elem = jQuery('.knopikWindow');
79					jQuery('.knopikWindow').animate({scrollTop: elem[0].scrollHeight }, 10);
80					chatGetMessage();
81					chatGetUser();
82				}
83			}
84		});	
85	}
86}
87
88jQuery(document).ready(function(){
89	
90	var IE='\v'=='v';
91	
92	if( device.desktop() && !IE){
93		jQuery("#chatSend").click(function(){chat();return false;});
94		
95		jQuery("input[name=addtocart]").click(function(){
96		    jQuery.cookie('caching','stop', { expires: 2, path: "/", domain: "ats-express.ru" });
97		    return true;
98		});
99
100		jQuery("#sendMail").click(function () {
101			var mailSendText= jQuery("textarea[name=messagel]").val();
102			if(mailSendText == '') return;
103		
104			jQuery.ajax({
105				url: "/lib/chat.php?type=mail",
106				type: "POST",
107				data: "message=" 	+ mailSendText 					+ 
108						'&name=' 	+ jQuery("input[name=namel]").val() 	+  
109						'&email=' 	+ jQuery("input[name=emaill]").val() +
110						'&tel=' 	+ jQuery("input[name=tell]").val(),
111				success: function(data){
112					if(data == 'empty') return;
113					else {
114						document.getElementById('forml').reset();
115					}
116				}
117			});
118			return false;
119		});
120		
121		jQuery('input[name=chat]').keyup(function(e){if(e.keyCode == 13){chat();}});
122		
123		jQuery('.kn_1').liKnopik({sidePos:'left',  topPos: 10});
124		jQuery('.kn_4').liKnopik({sidePos:'left',  topPos: 180});
125		jQuery('.kn_2').liKnopik({sidePos:'right', topPos: 10});
126		jQuery('.kn_3').liKnopik({sidePos:'right', topPos: 348});
127		jQuery('.kn_5').liKnopik({sidePos:'right', topPos: 398});
128		
129		setInterval(function(){chatGetMessage();},5000);
130	} else {
131		jQuery('.kn_1').remove();
132		jQuery('.kn_2').remove();
133		jQuery('.kn_3').remove();
134		jQuery('.kn_4').remove();
135		jQuery('.kn_5').remove();
136	}
137});
138

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.