PageSourceSearch

https://www.thnet.gov.cn/global/common.js

js thnet.gov.cn collected 2026-10-02 15:13:26 UTC 1,856 bytes, 59 lines download raw bytes

1// JavaScript Document
2//判断当前字符串是否以str开始 先判断是否存在function是避免和js原生方法冲突,自定义方法的效率不如原生的高
3if (typeof String.prototype.startsWith != 'function'){
4	String.prototype.startsWith = function(str) {
5		return this.slice(0, str.length) == str;
6	};
7}    
8//判断当前字符串是否以str结束
9if (typeof String.prototype.endsWith != 'function') {
10	String.prototype.endsWith = function(str) {
11		return this.slice(-str.length) == str;
12	};
13}
14
15$(function() {
16	$(".switchClose").on("click", function(e){
17		$(this).stop().animate({right:-68}, "slow");
18		$(".switchOpen").stop().animate({right:0}, "slow");
19		$(".dlBox").stop().animate({right:-68}, "slow");
20	});
21	
22	$(".switchOpen").on("click", function(){
23		$(this).stop().animate({right:-68}, "slow");
24		$(".switchClose").stop().animate({right:0}, "slow");
25		$(".dlBox").stop().animate({right:0}, "slow");
26	});
27	
28	$(".easybtn dl").hover(function(){$(this).find("dd").show();},function(){$(this).find("dd").fadeOut("fast");});
29	
30
31	
32	try{
33		var str = $(".curmb").text(); 
34		var str1 = str.split(">")[1];
35		if($.trim(str1)!=''){
36			$(".mainnav li").each(function(){
37				if($(this).find("a").attr("title").search($.trim(str1))>-1){
38					$(this).addClass("acur");}
39			});
40		}
41	}catch(e){}
42	
43	/*跳转提示*/
44	// $("a").not(".header a, .footer a,.but #menuId19539,.znzx a",).click(function(){
45	//   var thisSrc = $(this).attr('href');
46	//   var thisTg = $(this).attr("target");
47	//   try {
48	// 	  if(thisSrc!=null&&thisTg!="FrameMain"&&thisSrc.indexOf(document.domain)<0&&thisSrc.startsWith('http://')||thisSrc.startsWith('https://')){
49	// 		  $(this).attr({
50	// 			  "href" : "/loading.html?url="+encodeURIComponent(thisSrc),
51	// 			  "target" : "_blank"
52	// 		  });
53	// 		}
54	//   }catch (e) {
55	// 	  //错误
56	// 	 }
57	// });
58});
59

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.