PageSourceSearch

https://trackersbook.com/template/hl031/js/ewave-common.js?v=20230223

js trackersbook.com collected 2026-10-05 19:28:59 UTC 6,454 bytes, 145 lines download raw bytes

1function switchNightMode() {
2  "0" == (document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || "0") ? (document.cookie = "night=1;path=/", document.documentElement.setAttribute("data-theme", 1), localStorage.theme = 1, console.log("\u591c\u95f4\u6a21\u5f0f\u5f00\u542f")) : (document.cookie = "night=0;path=/", document.documentElement.setAttribute("data-theme", 0), localStorage.theme = 0, console.log("\u591c\u95f4\u6a21\u5f0f\u5173\u95ed"))
3}(function () {
4  if ($(".wb-switch").length > 0) { //后台开启自动黑夜模式下,定时触发
5    if ("" === document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1")) 21 < (new Date).getHours()
6      || 6 > (new Date).getHours() ? (document.cookie =
7        "night=1;path=/", document.documentElement.setAttribute("data-theme", 1), localStorage.theme = 1, console.log("\u591c\u95f4\u6a21\u5f0f\u5f00\u542f")) : (document.cookie = "night=0;path=/", document.documentElement.setAttribute("data-theme", 0), localStorage.theme = 0, console.log("\u591c\u95f4\u6a21\u5f0f\u5173\u95ed"));
8    else { //后台关闭自动下,当前为固定模式,判断此时属于黑夜,白天后触发
9      var a = document.cookie.replace(/(?:(?:^|.*;\s*)night\s*\=\s*([^;]*).*$)|^.*$/, "$1") || "0";
10      "0" == a ? (document.documentElement.setAttribute("data-theme", 0)) : "1" == a
11    }
12  }
13})();
14
15//社交分享
16function shareys(a, c, b, e, d) {
17  switch (a) {
18    case "sina":
19      c = "http://service.weibo.com/share/share.php?title=" + encodeURIComponent(d + "\u300c" + b + "\u300d \u70b9\u8fd9\u91cc" + c) + " pic=" + e;
20      window.open(c);
21      break;
22    case "tqq":
23      c = "https://connect.qq.com/widget/shareqq/index.html?url=" + encodeURIComponent(c) + " title=" + encodeURIComponent(b) + " pics=" + e;
24      window.open(c);
25      break;
26    case "qzone":
27      c = "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=" + encodeURIComponent(c) + " title="
28        + encodeURIComponent(b) + " site= pics=" + encodeURIComponent(e) + " desc=" + encodeURIComponent(d) + " summary=" + encodeURIComponent(d);
29      window.open(c);
30      break;
31    case "ren":
32      c = "http://widget.renren.com/dialog/share?resourceUrl=" + encodeURIComponent(c) + " srcUrl=" + e + " title=" + encodeURIComponent(b), NaN + d, window.open(c)
33  }
34}
35
36function Share(pType) {
37  var pTitle = share_title;
38  var pImage = share_pic;
39  var pContent = share_text;
40  var pUrl = window.location.href;
41  shareys(pType, pUrl, pTitle, pImage, pContent);
42}
43
44$(function () {
45  if (localStorage.theme > 0) {
46    $(".wb-switch").prop("checked", true);
47  } else {
48    $(".wb-switch").prop("checked", false);
49  }
50  //回顶部
51  $("#scroll-to-top").on("ontouchstart" in window ? "touchstart" : "click", function (e) {
52    e.preventDefault();
53    $("body, html").animate({
54      scrollTop: 0
55    }, 500);
56  });
57  $("#soStats").click(function () {
58    $(this).find("#soico").toggleClass("fa-search fa-times-circle");
59    $("#navbar-search").toggleClass("soopen sooff");
60  });
61  $(".navbar-search-close").click(function () {
62    $("#soStats").find("#soico").removeClass("fa-times-circle").addClass("fa-search");
63    $("#navbar-search").removeClass("soopen sooff");
64  });
65  $("#soblur").focus(function () {
66    $(".top_so").addClass("top_ac");
67  });
68  $("#soblur").blur(function () {
69    $(".top_so").removeClass("top_ac");
70  });
71  $(".menu-item").click(function () {
72    $(this).children("ul").slideToggle("fast");
73    $(this).find(".top-type-icon").toggleClass("fa-caret-right fa-caret-down");
74    $(this).siblings().children("ul").slideUp("fast");
75    $(".menu-item-overlay").css({
76      left: 25 * $(this).prevAll().length + "%"
77    });
78  });
79  $('.ewave-history-text').click(function () {
80    $(this).siblings(".ewave-history-box").toggleClass("active");
81  });
82  $(".detail-info .ewave-collapse-toggle").click(function () {
83    $(".detail-info .detail-info-actor").toggleClass("text-row-2");
84  });
85  $(".entry-content p img").each(function () {
86    if (!$(this).hasClass("biaoqing")) {
87      var image_title = $(this).parents(".entry-content p").find("img").attr("alt");
88      if (image_title != undefined && image_title != '') {
89        $("<figcaption class='image_title' ></figcaption >").insertAfter(this);
90        $(this).siblings(".image_title").html('<i class="icon iconfont icon-huatifuhao" ></i > ' + image_title);
91      }
92    }
93  });
94  $("footer").removeClass("fixed-bottom");
95  document.body.scrollHeight > window.innerHeight ? $("footer").removeClass("fixed-bottom") : $("footer").addClass("fixed-bottom");
96  var regx = /\.(jpe?g|png)(?=\?|$)/i;
97  $(".entry-content").find("a").each(function () {
98    var a = $(this).attr("href");
99    regx.test(a) || $(this).attr("rel", "external")
100  });
101  $('[data-toggle="offcanvas"], .mobile-overlay').click(function () {
102    $(".mobile-overlay").toggleClass("active");
103    $("body").toggleClass("active");
104    $(".sidebar-offcanvas").toggleClass("active");
105    $(".navbar-toggle").toggleClass("collapsed");
106    $(".navbar-collapse").addClass("transition");
107    $(".collapse").toggleClass("navss");
108    $(".m_nav-list").toggleClass("m_nav-close");
109  });
110  $(".empty-box").each(function () {
111    var $that = $(this);
112    if ($that.find(".empty-list").children().length == 0) {
113      $that.remove();
114      if ($that.hasClass("empty-box-tab")) {
115        $(".empty-box-" + $that.attr("data-tab") + ",.tab-toggle-" + $that.attr("data-tab")).hide().removeClass("tab-toggle");
116      }
117    }
118  });
119  $(".link-empty").each(function () {
120    if ($(this).attr("href") == '') {
121      $(this).attr("href", "javascript:;");
122    }
123  });
124});
125
126$(window).resize(function () {
127  $("footer").removeClass("fixed-bottom");
128  document.body.scrollHeight > window.innerHeight ? $("footer").removeClass("fixed-bottom") : $("footer").addClass("fixed-bottom");
129});
130$("#scroll-to-top")[100 < $(window).scrollTop() ? "removeClass" : "addClass"]("hide");
131$(window).scroll(function () {
132  $("#scroll-to-top")[100 < $(window).scrollTop() ? "removeClass" : "addClass"]("hide");
133});
134
135
136//点击搜索访问外触发关闭
137$(document).on("click", function (e) {
138  var target = $(e.target);
139  if (target.closest(".search-warp").length == 0) { //点击id为parentId之外的地方触发
140    $(".top_so").removeClass("top_ac");
141  }
142  if (target.closest(".ewave-history-text,.ewave-history-box").length == 0) {
143    $(".ewave-history-box").removeClass("active");
144  }
145});

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.