PageSourceSearch

https://www.scspc.gov.cn/js/nav.js?v=13

js scspc.gov.cn collected 2026-10-02 16:42:06 UTC 1,486 bytes, 56 lines download raw bytes

1// 站点页头:顶部占位 + 搜索框 + 主导航(nav-bar.js)
2// 仅需主导航栏时,请单独引入 nav-bar.js
3
4var DOMAIN_PREFIX =
5  window.BASE_URL ||
6  window.location.protocol + "//" + window.location.host + "/";
7
8(function injectNavShell() {
9  var p = [];
10  p.push("<div class='top'>");
11  p.push("</div>");
12  p.push("<div class='top-2'>");
13  p.push("</div>");
14
15  var html = p.join("");
16  var ref = document.currentScript;
17  if (ref && ref.insertAdjacentHTML) {
18    ref.insertAdjacentHTML("afterend", html);
19  } else {
20    document.write(html);
21  }
22})();
23
24(function loadNavBarScript() {
25  var cur = document.currentScript;
26  if (!cur || !cur.src) return;
27  var barSrc = cur.src.replace(/nav\.js(\?.*)?$/i, "nav-bar.js$1");
28  document.write('<script src="' + barSrc + '"><\/script>');
29})();
30
31function pad2(n) {
32  return n < 10 ? "0" + n : String(n);
33}
34function getCurrentFormattedDate() {
35  var now = new Date();
36  var year = now.getFullYear();
37  var month = pad2(now.getMonth() + 1);
38  var day = pad2(now.getDate());
39  var weekdays = [
40    "星期日",
41    "星期一",
42    "星期二",
43    "星期三",
44    "星期四",
45    "星期五",
46    "星期六",
47  ];
48  var weekday = weekdays[now.getDay()];
49  return year + "年" + month + "月" + day + "日 " + weekday;
50}
51document.addEventListener("DOMContentLoaded", function () {
52  var dateElement = document.querySelector(".nowDate");
53  if (dateElement) {
54    dateElement.textContent = getCurrentFormattedDate();
55  }
56});

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.