PageSourceSearch

https://www.expoculturepark.cn/Public/Cn/Yongsy/Yongsy.js

js expoculturepark.cn collected 2026-10-03 01:33:01 UTC 3,100 bytes, 108 lines download raw bytes

1/**
2 * Determine if the site is stopped
3 * @returns {undefined}
4 */
5function closeWeb() {
6    var xmlhttp = new XMLHttpRequest();
7    xmlhttp.open("POST", "/Yongsylogin/Ext/closeWeb.html", true);
8    xmlhttp.send();
9    xmlhttp.onreadystatechange = function () {
10        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
11            console.log(xmlhttp.responseText);
12            if (xmlhttp.responseText == 2) {
13                // /Public/ErrorTpl/404.html
14                location.href = '/404.html';
15            }
16        }
17    }
18}
19/**
20 * Determine the IP  language jump
21 * @returns {undefined}
22 */
23function judgeWeb() {
24    var xmlhttp = new XMLHttpRequest();
25    xmlhttp.open("POST", "/Cn/Verifyip/judgeWeb.html", true);
26    xmlhttp.send();
27    xmlhttp.onreadystatechange = function () {
28        if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
29            var judObj = JSON.parse(xmlhttp.responseText);
30            if(judObj.code == 1){
31                window.location.href=judObj.url;
32            }
33        }
34    }
35}
36
37(function () {
38    closeWeb();
39    judgeWeb();
40})();
41
42//// 锚点定位
43//function yxtop(tp) {
44//    setTimeout(function () {
45//        $("html,body").animate({scrollTop: $('[yxdatop-pag="' + tp + '"]').offset().top - 72}, 700);
46//    }, 800);
47//}
48
49//写cookies,一个小时过期 
50function setCookie(name, value) {
51    var exp = new Date();
52    exp.setTime(exp.getTime() + 60 * 60 * 1000);
53    document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString() + ";path=/";
54}
55//读取cookies 
56function getCookie(name) {
57    var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
58    if (arr = document.cookie.match(reg))
59        return unescape(arr[2]);
60    else
61        return null;
62}
63//删除cookies 
64function delCookie(name) {
65    var exp = new Date();
66    exp.setTime(exp.getTime() - 60 * 60 * 1000);
67    var cval = getCookie(name);
68    if (cval != null)
69        document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString() + ";path=/";
70}
71
72// 搜索的方法
73queryData = {
74    query: function (url, wd) {
75        var base = new this.Base64();
76        if (wd) {
77            location.href = url + "/wd/" + base.encode(wd);
78        } else {
79            location.href = url;
80        }
81    },
82    Base64: function Base64() {
83
84        // public method for encoding
85        this.encode = function (input) {
86            /**
87             * / 替换成 %^%
88             * \ 替换成 %$%
89             * @type @exp;input@call;replace|@exp;input@call;replace
90             */
91//            var oInput = input.replace('/', '%^%');
92//            oInput = oInput.replace('\\', '%$%');
93            var oInput = getSpecifiedStr(input, '/', '%^%');
94            oInput = getSpecifiedStr(oInput, '\\', '%$%');
95            return encodeURIComponent(oInput);
96        }
97    }
98}
99// 检索的字符串替换特殊字符的方法
100function getSpecifiedStr(str, find, spec) {
101    var newStr = str.replace(find, spec);
102    var len = newStr.indexOf(find);
103    if (len != -1) {
104        newStr = getSpecifiedStr(newStr, find, spec);
105    }
106    return newStr;
107}
108

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.