PageSourceSearch

https://en.sz-sunway.com/common/plugin/global.js

js sz-sunway.com collected 2026-10-04 21:44:50 UTC 2,249 bytes, 75 lines download raw bytes

1//全局弹出框修改
2window.alert = function (mes, option) {
3	if (option == undefined) {
4		layer.msg(mes);
5	}
6	else {
7		layer.msg(mes, option);
8	}
9
10}
11
12//全局弹懒加载   动态数据除外
13layui.use('flow', function () {
14	var flow = layui.flow;
15
16	//按屏加载图片
17	flow.lazyimg({
18		elem: '.Lazy_Container img'
19		, scrollElem: '.Lazy_Container'
20	});
21
22});
23function getParam(paramName) {
24	paramValue = "", isFound = !1;
25	if (this.location.search.indexOf("?") == 0 && this.location.search.indexOf("=") > 1) {
26		arrSource = unescape(this.location.search).substring(1, this.location.search.length).split("&"), i = 0;
27		while (i < arrSource.length && !isFound) arrSource[i].indexOf("=") > 0 && arrSource[i].split("=")[0].toLowerCase() == paramName.toLowerCase() && (paramValue = arrSource[i].split("=")[1], isFound = !0), i++
28	}
29	return paramValue == "" && (paramValue = null), paramValue
30}
31//Hey ! Is Me,My From jiangxi,Now Live ShenZhen,I Hava a Dream。
32//对电子邮件的验证
33var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
34function checkemail(email) {
35	if (!myreg.test(email)) {
36		return false;
37	}
38	return true;
39}
40//对手机号码进行验证(中国)
41var myreg_checkPhone = /^1[3|4|5|7|8][0-9]{9}$/;
42function checkphone(phone) {
43	if (!myreg_checkPhone.test(phone)) {
44		return false;
45	}
46	return true;
47}
48//过滤非法字符  
49function stripscript(s) {
50	var pattern = new RegExp("[<>{}\\[\\];\\&]")
51	if (pattern.test(s)) {//如果包含特殊字符
52		return false;
53	}
54	return true;
55}
56function CheckInput(obj) {
57	var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]")
58	if (pattern.test(obj)) {
59		return false;
60	}
61	return true;
62}
63$(".GlobalSearch").submit(function () {
64	var keyword = $(this).find("input[name=k]").val(); //.replace(/\s+/g, "")
65	if (keyword.length < 1) {
66		alert("Please type search keywords");
67		return false;
68	}
69	if (!CheckInput(keyword)) {
70		alert("Contains illegal keywords, please re-enter");
71		return false;
72	}
73	window.open("/search/index.html?k=" + escape(keyword), "_blank");
74	return false;
75});

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.