PageSourceSearch

https://jingan.gov.cn/js/commonPagingJS.js

js jingan.gov.cn collected 2026-10-02 06:06:10 UTC 2,601 bytes, 79 lines download raw bytes

1// 是否为移动端
2function isMobile() {
3	var ua = navigator.userAgent;
4
5	var detect = {
6		// 是否为移动终端
7		mobile: !!ua.match(/AppleWebKit.*Mobile.*/),
8		// ios终端
9		ios: !!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
10		// android终端或者uc浏览器
11		android: ua.indexOf('Android') > -1 || ua.indexOf('Linux') > -1,
12		// 是否为iPhone或者QQHD浏览器
13		iPhone: ua.indexOf('iPhone') > -1,
14		// 是否iPad
15		iPad: ua.indexOf('iPad') > -1
16	};
17
18	return (detect.mobile || detect.ios || detect.android || detect.iPhone || detect.iPad);
19};
20
21function pageRender(templatepath,pagecount,totalnum,categoryPath,categorynum,pagetotalcount){
22		var $pager = $("#pager");
23		if ($pager.pagination()) {
24			$pager.pagination('destroy');
25		}
26		if (!totalnum) {
27			return;
28		}
29		var nowHref = window.location.href,
30		secSrc = nowHref.split('/')[nowHref.split('/').length - 1];
31		var pageSize =nowHref.split("pageIndex=")[1];
32		if(pageSize == null){
33			pageSize= secSrc.split(".")[0];
34			if(!(/[0-9]/.test(pageSize))){
35				pageSize=1;
36			}
37		}
38		var count = Math.ceil(totalnum/pagecount);
39		var pagerConfig = {
40			pageIndex: pageIndex,
41			pageSize: pagecount,
42			total: totalnum,
43			showJump: true,
44			jumpBtnText: 'Go',
45			pageBtnCount: 10,
46			showFirstLastBtn: true,
47			showInfo: true,
48			showPageSizes: true,
49			isChosen: false, //是否使用chosen插件下拉框,为true时,需引入chosen插件相关。
50			infoFormat: '共<span>{total}</span>記録		'+pageSize+'/'+count+'		回す &nbsp;'
51		};
52		if (isMobile()) {
53			$pager.pagination($.extend(pagerConfig, {
54				pageBtnCount: 3,
55				showFirstLastBtn: false,
56				showInfo: false,
57				showPageSizes: false
58			}));
59		} else {
60			$pager.pagination(pagerConfig);
61		}
62	$("#pager").on("pageClicked", function (event, data) {
63	    if(data.pageIndex<=0){
64	        window.location.href=categoryPath+"/"+templatepath;
65	    }else if(data.pageIndex<count){
66	        window.location.href= categoryPath+"/"+(data.pageIndex+1)+".html";
67	    }else{
68	   		window.location.replace(categoryPath+"/"+templatepath+"?categoryNum="+categorynum+"&pageIndex="+(data.pageIndex+1));
69		}
70	}).on('jumpClicked', function (event, data) {
71	    if(data.pageIndex<=0){
72	        window.location.href=categoryPath+"/"+templatepath;
73	    }else if(data.pageIndex<count){
74	        window.location.href=categoryPath+"/"+(data.pageIndex+1)+".html";
75	    }else{
76	   	 	window.location.replace(categoryPath+"/"+templatepath+"?categoryNum="+categorynum+"&pageIndex="+(data.pageIndex+1));
77		}
78	});
79}

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.