PageSourceSearch

https://jw.dhu.edu.cn/_js/sudy-jquery-autoload.js

js dhu.edu.cn collected 2026-10-02 03:38:21 UTC 1,438 bytes, 37 lines download raw bytes

1(function() {
2    //如果界面上没有加载jquery,执行jquery装载
3    if (!window.jQuery) {
4        var scripts = document.getElementsByTagName('script');
5        var currSrc = scripts[scripts.length - 1].getAttribute("src");
6        var parentPath = currSrc.replace(/sudy-jquery-autoload.js/, "");
7
8        //todo,由于jquery的1.9.1以后版本和2.x版本不支持ie6、7、8,
9        //判断如果当前是jquery-1.x.min.js 或 jquery-2.x.min.js,并且浏览器是ie6、7、8,直接加载为jquery-1.9.1.min.js
10        var jquerySrc = scripts[scripts.length - 1].getAttribute("jquery-src");
11        try {
12            if (is_lessIE_6_7_8()) {
13                jquerySrc = parentPath + "jquery-1.9.1.min.js";
14            }
15        } catch (e) {
16            //如果上述代码异常,采用默认注册的脚本
17            jquerySrc = scripts[scripts.length - 1].getAttribute("jquery-src");
18        }
19        document.write('<script type="text/javascript" src="' + jquerySrc + '"><\/script>');
20    }
21})();
22
23/**
24 * 判断是否为低版本ie(6、7、8)
25 * @returns {Boolean}
26 */
27function is_lessIE_6_7_8() {
28    var versionNum = 9;
29    if (/Microsoft Internet Explorer/i.test(navigator.appName)) {
30        var ver = navigator.appVersion.match(/msie(\s+)?(\d)/i);
31        if (ver && Number(ver[2]) < versionNum) {
32            return true;
33        }
34    }
35    return false;
36}
37

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.