PageSourceSearch

https://www.nchu.edu.cn/content/_common/base/js/webcommon.js?v=ljW6i7rKHEUp59lc_zfhwnswI9i0_GLgUiLfR8GAMUw

js nchu.edu.cn collected 2026-10-02 10:00:20 UTC 5,071 bytes, 153 lines download raw bytes

1//列高度统一
2function heightFix(column, column2, sign, offset) {
3    var oCol = jQuery(column);
4    var oCol2 = jQuery(column2);
5    if (sign == undefined) {
6        sign = "+";
7    }
8    if (offset == undefined) {
9        offset = 0;
10    }
11    if (oCol.height() > oCol2.height()) {
12        if (sign == "+") {
13            oCol2.height(oCol.height() + offset);
14        } else {
15            oCol2.height(oCol.height() - offset);
16        }
17    }
18}
19
20//获得日期
21function RunGLNL(obj) {
22    var today = new Date();
23    var d = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
24    var DDDD = (today.getFullYear() < 100 ? today.getFullYear() + 1900 : today.getFullYear()) +
25        "å¹´" +
26        (today.getMonth() + 1) +
27        "月" +
28        today.getDate() +
29        "日";
30    DDDD = DDDD + " " + d[today.getDay()];
31    jQuery(obj).text(DDDD);
32}
33
34// 加入收藏代码 Start -->
35function AddFavorite(sURL, sTitle) {
36    try {
37        var ctrl = navigator.userAgent;
38        ctrl = ctrl.toLocaleLowerCase();
39        if (document.all || ctrl.match(/msie/) != null || ctrl.match(/trident/) != null) { //IE类浏览器
40            window.external.addFavorite(sURL, sTitle);
41        } else {
42            if (window.sidebar) { //firfox等浏览器
43                window.sidebar.addPanel(sTitle, sURL, "");
44            } else {
45                alert("加入收藏失败,请使用Ctrl+D进行添加");
46            }
47        }
48    } catch (e) {
49        alert("加入收藏失败,请使用Ctrl+D进行添加");
50    }
51}
52
53// 设为首页代码 Start -->
54
55function SetHome(thiss, pageURL) {
56    if (document.all) {
57
58        thiss.style.behavior = 'url(#default#homepage)';
59        thiss.setHomePage(pageURL);
60    } else if (window.sidebar) {
61        if (window.netscape) {
62            try {
63                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
64            } catch (e) {
65                alert(
66                    "该操作被浏览器拒绝,如果想启用该功能,请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true");
67            }
68        }
69        var prefs = Components.classes['@mozilla.org/preferences-service;1']
70            .getService(Components.interfaces.nsIPrefBranch);
71        prefs.setCharPref('browser.startup.homepage', pageURL);
72    } else {
73        alert('您的浏览器不支持自动自动设置首页, 请使用浏览器菜单手动设置!');
74    }
75}
76
77//针对ie6增加悬停样式
78function hover(obj, className) {
79    var className = !className ? "hover" : className;
80    jQuery(obj)
81        .hover(function () { jQuery(this).addClass(className); }, function () { jQuery(this).removeClass(className); });
82}
83
84$(document)
85    .ready(function () {
86
87        //返回顶部
88        var goTop = $('<span id="goTop"></span>');
89        $("body").append(goTop);
90        var winH,
91            winT;
92        var winFun = function () {
93            winH = $(window).height();
94            winT = $(document).scrollTop();
95            if (winT > winH) {
96                goTop.fadeIn();
97            } else {
98                goTop.fadeOut();
99            }
100        };
101        goTop.click(function () { $("html, body").animate({ scrollTop: 0 }, 0) });
102        $(window).scroll(winFun);
103
104        //搜索、导航遮罩
105        var winMark = $('<span id="winMark"></span>');
106        $("body").append(winMark);
107
108        var showList = $("[showId]");
109        var hideBox = $("[hideBox]");
110        showList.click(function () {
111            showList.not($(this)).removeClass("on");
112            hideBox.not($(this).attr("showId")).removeClass("show");
113
114            if ($(this).hasClass("on")) {
115                $(this).removeClass("on");
116                $($(this).attr("showId")).removeClass("show");
117                winMark.removeClass("show");
118            } else {
119                $(this).addClass("on");
120                $($(this).attr("showId")).addClass("show");
121                winMark.addClass("show");
122            }
123        });
124        winMark.click(function () {
125            showList.removeClass("on");
126            hideBox.removeClass("show");
127            $(this).removeClass("show");
128        });
129
130        // 项目反馈内容页语音条无法去掉
131        // $("article").each(function () {
132        //     var powerAccessibleReading = $(this).find(".conTxt").first().attr("data-power-accessible-reading");
133        //     if (powerAccessibleReading == undefined) {
134        //         $(this).find(".conTxt").first().attr("data-power-accessible-reading", "")
135        //     }
136        // });
137    });
138
139//html5 for ie6/7/8
140(function () {
141    if (!
142        /*@cc_on!@*/
143        0) {
144        return;
145    }
146    var e =
147        "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark, menu, meter, nav, output, progress, section, time, video"
148            .split(', ');
149    var i = e.length;
150    while (i--) {
151        document.createElement(e[i]);
152    }
153})();

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.