PageSourceSearch

https://www.nchu.edu.cn/content/_common/base/js/power.loadgrayscal…ut3URo2Ih340lrVjqmSurHhTHQeGu429552kivU7YRA

js nchu.edu.cn collected 2026-10-02 10:02:24 UTC 2,901 bytes, 91 lines download raw bytes

1$(function () {
2    'use strict';
3
4    var grayscaleConfig = window.POWER_GRAYSCALE_CONFIG;
5    if (!grayscaleConfig) {
6        return;
7    }
8
9    var startDateTime = new Date(grayscaleConfig.StartDateTime);
10    var endDateTime = new Date(grayscaleConfig.EndDateTime);
11    var nowDate = new Date();
12
13    if (grayscaleConfig.Enabled &
14        nowDate.getTime() >= startDateTime.getTime() &
15        nowDate.getTime() <= endDateTime.getTime() &
16        checkSiteScope() & checkPageScope()) {
17        var navStr = navigator.userAgent.toLowerCase();
18        if (navStr.indexOf("msie 10.0") !== -1 || navStr.indexOf("rv:11.0") !== -1) {
19            $.when($.ajax()).then(function () {
20                grayscale($("html"));
21            });
22
23            $('.mainNav li a').hover(
24                function () {
25                    $(this).css("background", "#545454");
26                },
27                function () {
28                    $(this).css("background", "#585858");
29                });
30
31            subMenuFixed = true;
32            var subMenuTop = $(".topNav").offset().top;
33            $(window)
34                .scroll(function () {
35                    if (subMenuFixed) {
36                        if ($(window).scrollTop() >= subMenuTop) {
37                            $(".topNav").addClass("topNav-fixed");
38                            $(".topNav").css("background", "#585858");
39                        } else {
40                            $(".topNav").removeClass("topNav-fixed");
41                            $(".topNav").css("background", "");
42                        }
43                    }
44                });
45        }
46    }
47
48    function checkSiteScope() {
49        if (grayscaleConfig.SiteScope) {
50            if (grayscaleConfig.SiteScope == 'AllSite') {
51                return true;
52            }
53
54            if (grayscaleConfig.SiteScope == 'OnlyMain') {
55                if ($("meta[name=SiteId]").attr("content") == '1') {
56                    return true;
57                }
58            }
59
60            if (grayscaleConfig.SiteScope == 'SpecifySite') {
61                var siteId = $("meta[name=SiteId]").attr("content");
62                if (grayscaleConfig.SpecifySites && grayscaleConfig.SpecifySites.includes(parseInt(siteId))) {
63                    return true;
64                }
65            }
66
67            return false;
68        }
69
70        return true;
71    }
72
73    function checkPageScope() {
74        if (grayscaleConfig.PageScope) {
75            if (grayscaleConfig.PageScope == 'AllPage') {
76                return true;
77            }
78
79            if (grayscaleConfig.PageScope == 'OnlyHome') {
80                if ($('meta[name=IsHome]').attr('content') == 'true' ||
81                    $('meta[name=ColumnName]').attr('content') == '网站首页') {
82                    return true;
83                }
84            }
85
86            return false;
87        }
88
89        return true;
90    }
91})

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.