PageSourceSearch

https://www.stopwatchtimer.net/content/_common/base/js/webcommon.j…ceHgEDXROgzo-KunBlflrckEZvgNPTh_BGVdWG1BXno

js stopwatchtimer.net collected 2026-10-02 23:15:57 UTC 5,698 bytes, 171 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        ////$("article").each(function () {
131        ////    var powerAccessibleReading = $(this).find(".conTxt").first().attr("data-power-accessible-reading");
132        ////    if (powerAccessibleReading == undefined) {
133        ////        $(this).find(".conTxt").first().attr("data-power-accessible-reading", "")
134        ////    }
135        ////});
136    });
137
138//html5 for ie6/7/8
139(function () {
140    if (!
141        /*@cc_on!@*/
142        0) {
143        return;
144    }
145    var e =
146        "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark, menu, meter, nav, output, progress, section, time, video"
147            .split(', ');
148    var i = e.length;
149    while (i--) {
150        document.createElement(e[i]);
151    }
152})();
153
154// 检查链接是否存在且不以http或https开头
155$(document).ready(function() {
156    $("[checklink] a").each(function() {
157        const $link = $(this);
158        const href = $link.attr('href');
159        
160         // 特殊处理:/hunan.gov.cn 或 /www.hunan.gov.cn 开头的“伪路径”
161        if (/^\/(www\.)?hunan\.gov\.cn\//.test(href)) {
162            $link.attr('href', 'https://' + href.substring(1));
163            return;
164        }
165        
166        // 仅处理存在且不以/、协议(如http/ftp/mailto等)开头的链接
167        if (href &&  !/^\/|^[a-zA-Z]+:\/\//.test(href)) {
168            $link.attr('href', 'https://' + href);
169        }
170    });
171});

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.