PageSourceSearch

https://www.1566-1976.com/core/javascript/statjssiteId17siteUrl/st…_notHost_false_contentId_1_classId_11081.js

js 1566-1976.com collected 2026-10-09 23:41:37 UTC 12,653 bytes, 508 lines download raw bytes

1
2var scripts = document.getElementsByTagName('script');
3var currentScriptSrc ;
4
5var cidTemp;
6
7var contentId = -1;
8var classId = -1;
9var siteId = -1;
10var siteUrl = '';
11var domain = '';
12var notHost = 'false';
13
14for(var i = scripts.length-1; i >= 0; i-- )
15{
16	currentScriptSrc = scripts[i].src;
17
18	if(currentScriptSrc != '' && currentScriptSrc.indexOf('core/javascript/stat.js') != -1)
19	{
20		var temp = currentScriptSrc.split('?');
21		
22		domain = temp[0].replace('core/javascript/stat.js','');
23	
24		var param = temp[1];
25		var paramA;
26		if(typeof(temp[1]) !== 'undefined')
27		{
28			paramA = param.split('&');
29			
30			for(var i=0; i<paramA.length; i++)
31			{
32				cidTemp = paramA[i].split('=');
33					
34				if('siteId' == cidTemp[0])
35				{
36					siteId = cidTemp[1];
37				}
38				else if('siteUrl' == cidTemp[0])
39				{
40					siteUrl = cidTemp[1];
41				}
42
43				else if('notHost' == cidTemp[0])
44				{
45					notHost = cidTemp[1];
46				}
47
48				
49				else if('classId' == cidTemp[0])
50				{
51					classId = cidTemp[1];
52				}
53				
54				else if('contentId' == cidTemp[0])
55				{
56					contentId = cidTemp[1];
57				}
58
59			}
60
61		}
62		
63		break;
64	}
65	
66}
67
68 
69
70var hostUrl = siteUrl;
71 
72
73function AJAX(url ,method ,data) 
74{ 
75 if (window.XMLHttpRequest)
76  {    
77  	req = new XMLHttpRequest();   
78  	req.onreadystatechange = processAjaxResponse;    
79  	req.open(method, url, true);  
80  	
81  	req.setRequestHeader('Content-Type','whatever');
82 	req.setRequestHeader('Content-Length',data.length);
83 	req.setRequestHeader('Connection','close');
84 	 	  
85  	req.send(data);  
86  } 
87  else if (window.ActiveXObject) 
88  {    
89 	req = new ActiveXObject("Microsoft.XMLHTTP");    
90 	if (req) 
91 	{      
92 		req.onreadystatechange = processAjaxResponse;     
93 	 	req.open(method, url, true); 
94 	 	    
95 	 	req.setRequestHeader('Content-Type','whatever');
96 	 	req.setRequestHeader('Content-Length',data.length);
97 	 	req.setRequestHeader('Connection','close');
98 	 	
99 	 	req.send(data);     
100 	}  
101  }
102}
103
104function processAjaxResponse() 
105{  
106 if (req.readyState == 4) 
107 {
108   if (req.status == 200) 
109   {     
110   	 //alert(); 
111   }
112   else 
113   {      
114   	 // alert("There was a problem retrieving the XML data:/n" +      req.statusText);   
115   }
116 }  
117
118} 
119
120
121var second=0;  
122var minute=0;  
123var hour=0;  
124idt=window.setTimeout("intervalJTopVisTime();",1000);  
125function intervalJTopVisTime()
126{  
127        second++;  
128        if(second==60) 
129        {
130        	second=0;
131        	minute+=1;  
132        }
133        
134        if(minute==60) 
135        {
136        	minute=0;
137        	hour+=1;  
138        }
139        
140        //idt=window.setTimeout("interval();",1000);  
141}  
142
143
144
145var req;
146var visitID;
147collectUserVisitInfoAndSendToServer();
148
149function collectUserVisitInfoAndSendToServer() 
150{
151		var statData;
152       
153        var link = window.location.href;
154        
155        var host = window.location.host;
156      
157        var prevLink = document.referrer;
158
159  
160       // var titleName = document.title;
161   
162        var screen = window.screen.width + "*" + window.screen.height;    
163 
164        statData =hostUrl+'stat/collStat.do?'+"host="+encode(host)+"&url=" +encode(link) + "&reffer=" + encode(prevLink) +  "&system=" + getOsInfo() + "&screen=" + screen + "&browser=" + getBr() + "&refferKey=" + getKeyword(prevLink)+"&lang="+getLan()+"&contentId="+contentId+"&classId="+classId+"&siteId="+siteId;
165 
166		//只加载一次jquery资源
167		if (typeof jQuery == 'undefined') 
168		{ 
169		  		var fileObj=null;
170			 	fileObj=document.createElement('script');
171		        fileObj.src = domain+"/core/javascript/jquery-1.9.1.min.js";
172		       
173		        fileObj.onload = fileObj.onreadystatechange = function() 
174		        {
175		        	//只有js加载完成后,才可以执行
176			    	if (!this.readyState || 'loaded' === this.readyState || 'complete' === this.readyState) 
177		            {
178		            	//跨域
179			      
180				       $.getScript
181				       (
182					        statData,
183					       	function()
184					       	{
185					  
186					
187					    	}
188				       );
189		            }
190		         }
191		         document.getElementsByTagName('head')[0].appendChild(fileObj);
192		} 
193		else 
194		{ 
195			    //跨域
196			     
197		       $.getScript
198		       (
199			        statData,
200			       	function()
201			       	{
202			       
203			
204			    	}
205		       );
206		}
207
208       
209      
210}
211
212function encode(target)
213{
214	return encodeURIComponent(encodeURIComponent(target));
215}
216
217
218// 获取来自搜索引擎的关键词
219function getKeyword(url) {
220    if (url.toString().indexOf(".baidu.com") > 0) 
221    {
222        return request(url, "wd");
223    }
224    else if (url.toString().indexOf(".so.com") > 0) 
225    {
226        return request(url, "q");
227    }
228    else if (url.toString().indexOf(".haosou.com") > 0) 
229    {
230        return request(url, "q");
231    }
232    //else if (url.toString().indexOf("google") > 0) 
233   // {
234       // return request(url, "q");
235    //}
236    else if (url.toString().indexOf(".sogou.com") > 0) 
237    {
238        return request(url, "query");
239    }
240    else if (url.toString().indexOf(".soso.com") > 0) 
241    {
242        return request(url, "query");
243    }
244    else {
245        return "";
246    }
247}
248
249// 获取链接地址中某个参数的值
250function request(url, paras) 
251{
252    var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
253    var paraObj = {}
254    for (i = 0; j = paraString[i]; i++) {
255        paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length);
256    }
257    var returnValue = paraObj[paras.toLowerCase()];
258    if (typeof (returnValue) == "undefined") {
259        return "";
260    } else {
261        return returnValue;
262    }
263}
264
265// 回调函数,可以获取添加后的访问ID,以便其他操作。
266function callback() 
267{
268    if (req.readyState == 4) 
269    {
270        if (req.status == 200) 
271        {
272            visitID = req.responseText.toString();
273        }
274        else 
275        {
276            
277        }
278    }
279    else 
280    {
281        
282    }
283}
284
285
286
287/*
288 * 获取系统版本信息
289 */ 
290function getOsInfo() {
291    let userAgent = window.navigator.userAgent.toLowerCase()
292    let version = ''
293    if(userAgent.indexOf("win") > -1) {
294      if(userAgent.indexOf("windows nt 5.0") > -1 || userAgent.indexOf("Windows 2000") > -1) {
295        version = "Windows 2000";
296      } else if(userAgent.indexOf("windows nt 5.1") > -1 || userAgent.indexOf("Windows XP") > -1) {
297        version = "Windows XP";
298      } else if(userAgent.indexOf("windows nt 5.2") > -1 || userAgent.indexOf("Windows 2003") > -1) {
299        version = "Windows 2003";
300      } else if(userAgent.indexOf("windows nt 6.0") > -1 || userAgent.indexOf("Windows Vista") > -1) {
301        version = "Windows Vista";
302      } else if(userAgent.indexOf("windows nt 6.1") > -1 || userAgent.indexOf("windows 7") > -1) {
303        version = "Windows 7";
304      } else if(userAgent.indexOf("windows nt 6.2") > -1 || userAgent.indexOf("windows 8") > -1) {
305        version = "Windows 8";
306      } else if(userAgent.indexOf("windows nt 6.3") > -1) {
307        version = "Windows 8.1";
308      } else if(userAgent.indexOf("windows nt 6.4") > -1 || userAgent.indexOf("windows nt 10") > -1) {
309        version = "Windows 10";
310      } else {
311        version = "Unknown";
312      }
313    } else if(userAgent.indexOf("iphone") > -1) {
314      version = "Iphone";
315    } else if(userAgent.indexOf("mac") > -1) {
316      version = "Mac";
317    } else if(userAgent.indexOf("x11") > -1 || userAgent.indexOf("unix") > -1 || userAgent.indexOf("sunname") > -1 || userAgent.indexOf("bsd") > -1) {
318      version = "Unix";
319    } else if(userAgent.indexOf("linux") > -1) {
320      if(userAgent.indexOf("android") > -1) {
321        version = "Android"
322      } else {
323        version = "Linux";
324      }
325    } else {
326      version = "其他";
327    }
328	return version;
329}
330
331
332// 获取系统信息
333function getSystemInfo_NOTUSE() 
334{
335    var ua = navigator.userAgent.toLowerCase();
336    isWin8 = ua.indexOf("nt 6.2") > -1
337    isWin7 = ua.indexOf("nt 6.1") > -1
338    isVista = ua.indexOf("nt 6.0") > -1
339    isWin2003 = ua.indexOf("nt 5.2") > -1
340    isWinXp = ua.indexOf("nt 5.1") > -1
341    isWin2000 = ua.indexOf("nt 5.0") > -1
342    isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1)
343    isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1)
344    isAir = (ua.indexOf("adobeair") != -1)
345    isLinux = (ua.indexOf("linux") != -1)
346    isAndroid = ua.match(/android/i) === "android"
347    isIpad = ua.match(/ipad/i) === "ipad"
348    isIphoneOs = ua.match(/iphone os/i) === "iphone os"
349    
350    var broser = "";
351    if (isWin7) {
352        sys = "Windows 7";
353    } else if (isWin8) {
354        sys = "Windows 8";
355    } else if (isVista) {
356        sys = "Vista";
357    } else if (isWinXp) {
358        sys = "Windows XP";
359    } else if (isWin2003) {
360        sys = "Windows 2003";
361    } else if (isWin2000) {
362        sys = "Windows 2000";
363    } else if (isWindows) {
364        sys = "Windows";
365    } else if (isMac) {
366        sys = "Macintosh";
367    } else if (isAir) {
368        sys = "Adobeair";
369    } else if (isLinux) {
370        sys = "Linux";
371    } else if (isAndroid) {
372        sys = "Android";
373    } else if (isIpad) {
374        sys = "IPad";
375    } else if (isIphoneOs) {
376        sys = "Iphone";
377    } 
378    
379    else {
380        sys = "其他";
381    }
382    return sys;
383}
384
385// 获取浏览器类型
386function getBrowserType() 
387{
388
389    var ua = navigator.userAgent.toLowerCase();
390
391    if (ua == null) return "ie";
392
393    else if (ua.indexOf('chrome') != -1) return "c1";//返回chrome有bug,只能返回代号
394
395    else if (ua.indexOf('opera') != -1) return "opera";
396
397    else if (ua.indexOf('msie') != -1) return "ie";
398
399    else if (ua.indexOf('safari') != -1) return "safari";
400
401    else if (ua.indexOf('firefox') != -1) return "firefox";
402
403    else if (ua.indexOf('gecko') != -1) return "gecko";
404
405    else return "ie";
406
407}
408
409// 获取浏览器版本
410function getBrowserVersion() 
411{
412
413    var ua = navigator.userAgent.toLowerCase();
414
415    if (ua == null) return "null";
416
417    else if (ua.indexOf('chrome') != -1) return ua.substring(ua.indexOf('chrome') + 7, ua.length).split(' ')[0];
418
419    else if (ua.indexOf('opera') != -1) return ua.substring(ua.indexOf('version') + 8, ua.length);
420
421    else if (ua.indexOf('msie') != -1) return ua.substring(ua.indexOf('msie') + 5, ua.length - 1).split(';')[0];
422
423    else if (ua.indexOf('safari') != -1) return ua.substring(ua.indexOf('safari') + 7, ua.length);
424
425    else if (ua.indexOf('gecko') != -1) return ua.substring(ua.indexOf('firefox') + 8, ua.length);
426
427    else return "null";
428    
429    
430    
431}
432
433function getBr()
434{
435 
436	var userAgent = navigator.userAgent,   
437	rMsie = /(msie\s|trident.*rv:)([\w.]+)/,   
438	rFirefox = /(firefox)\/([\w.]+)/,   
439	rOpera = /(opera).+version\/([\w.]+)/,   
440	rChrome = /(chrome)\/([\w.]+)/,   
441	rSafari = /version\/([\w.]+).*(safari)/;  
442	var browser;  
443	var version;  
444	var ua = userAgent.toLowerCase();  
445	function uaMatch(ua){  
446	  var match = rMsie.exec(ua);  
447	  if(match != null){  
448	    return { browser : "IE", version : match[2] || "0" };  
449	  }  
450	  var match = rFirefox.exec(ua);  
451	  if (match != null) {  
452	    return { browser : match[1] || "", version : match[2] || "0" };  
453	  }  
454	  var match = rOpera.exec(ua);  
455	  if (match != null) {  
456	    return { browser : match[1] || "", version : match[2] || "0" };  
457	  }  
458	  var match = rChrome.exec(ua);  
459	  if (match != null) {  
460	  	//chrome返回代号
461	    return { browser : 'c1' || "", version : match[2] || "0" };  
462	  }  
463	  var match = rSafari.exec(ua);  
464	  if (match != null) {  
465	    return { browser : match[2] || "", version : match[1] || "0" };  
466	  }  
467	  if (match != null) {  
468	    return { browser : "", version : "0" };  
469	  }  
470	}  
471	var browserMatch = uaMatch(userAgent.toLowerCase());  
472	if ( typeof(browserMatch) != 'undefined' && browserMatch.browser){  
473	  browser = browserMatch.browser;  
474	  version = browserMatch.version;  
475	}  
476	return (browser+version);          
477 
478	
479}
480
481
482
483
484 
485
486 
487
488function getLan()
489{
490	var lan = '';
491	//ie 
492	if (navigator.browserLanguage != "undefined" && navigator.browserLanguage != null) 
493	{ 
494		lan = navigator.systemLanguage;
495	} 
496	//firefox、chrome,360 
497	else
498	{ 
499		lan = navigator.language; 
500	} 
501	
502	 return lan.toLowerCase();
503	 
504	 
505	 
506	 
507}
508

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.