diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js index 5ddd42e9..7e65c338 100644 --- a/templates/assets/js/heo.js +++ b/templates/assets/js/heo.js @@ -104,23 +104,23 @@ var heo_keyboard = !0, heo = { }, - // showLoading: function () { - // document.querySelector("#loading-box").classList.remove("loaded") - // }, + showLoading: function () { + document.querySelector("#loading-box").classList.remove("loaded") + }, - // hideLoading: function () { - // document.querySelector("#loading-box").classList.add("loaded") - // }, + hideLoading: function () { + document.querySelector("#loading-box").classList.add("loaded") + }, - // showConsole: function () { - // document.querySelector("#console").classList.add("show") - // }, + showConsole: function () { + document.querySelector("#console").classList.add("show") + }, - // hideConsole: function () { - // document.querySelector("#console").classList.remove("show") - // }, + hideConsole: function () { + document.querySelector("#console").classList.remove("show") + }, - // keyboardToggle: function () { - // heo_keyboard ? (heo_keyboard = !1, document.querySelector("#consoleKeyboard").classList.remove("on"), localStorage.setItem("keyboardToggle", "false")) : (heo_keyboard = !0, document.querySelector("#consoleKeyboard").classList.add("on"), localStorage.setItem("keyboardToggle", "true")) - // } + keyboardToggle: function () { + heo_keyboard ? (heo_keyboard = !1, document.querySelector("#consoleKeyboard").classList.remove("on"), localStorage.setItem("keyboardToggle", "false")) : (heo_keyboard = !0, document.querySelector("#consoleKeyboard").classList.add("on"), localStorage.setItem("keyboardToggle", "true")) + } }; \ No newline at end of file diff --git a/templates/assets/js/main.js b/templates/assets/js/main.js index c71f4f05..39986ec0 100644 --- a/templates/assets/js/main.js +++ b/templates/assets/js/main.js @@ -82,13 +82,13 @@ document.addEventListener("DOMContentLoaded", function () { }) } - // function A() { - // var a, c, r, s, l, d, u = document.getElementById("rightside"), f = window.innerHeight + 56; - // document.body.scrollHeight <= f ? u.style.cssText = "opacity: 1; transform: translateX(-38px)" : (c = !(a = 0), r = document.getElementById("page-header"), document.getElementById("guli_top"), s = document.getElementById("cookies-window"), l = "function" == typeof chatBtnHide, d = "function" == typeof chatBtnShow, window.addEventListener("scroll", btf.throttle(function (t) { - // var e, n, o = window.scrollY || document.documentElement.scrollTop, i = (n = a < (e = o), a = e, n); - // 56 < o ? (i ? (r.classList.contains("nav-visible") && r.classList.remove("nav-visible"), d && !0 === c && (chatBtnHide(), c = !1)) : (r.classList.contains("nav-visible") || r.classList.add("nav-visible"), l && !1 === c && (chatBtnShow(), c = !0)), r.classList.add("nav-fixed"), s.classList.add("cw-hide"), "0" === window.getComputedStyle(u).getPropertyValue("opacity") && (u.style.cssText = "opacity: 1; transform: translateX(-38px)")) : (0 === o && r.classList.remove("nav-fixed", "nav-visible"), u.style.cssText = "opacity: ''; transform: ''"), document.body.scrollHeight <= f && (u.style.cssText = "opacity: 1; transform: translateX(-38px)") - // }, 200))) - // } + function A() { + var a, c, r, s, l, d, u = document.getElementById("rightside"), f = window.innerHeight + 56; + document.body.scrollHeight <= f ? u.style.cssText = "opacity: 1; transform: translateX(-38px)" : (c = !(a = 0), r = document.getElementById("page-header"), document.getElementById("guli_top"), s = document.getElementById("cookies-window"), l = "function" == typeof chatBtnHide, d = "function" == typeof chatBtnShow, window.addEventListener("scroll", btf.throttle(function (t) { + var e, n, o = window.scrollY || document.documentElement.scrollTop, i = (n = a < (e = o), a = e, n); + 56 < o ? (i ? (r.classList.contains("nav-visible") && r.classList.remove("nav-visible"), d && !0 === c && (chatBtnHide(), c = !1)) : (r.classList.contains("nav-visible") || r.classList.add("nav-visible"), l && !1 === c && (chatBtnShow(), c = !0)), r.classList.add("nav-fixed"),"0" === window.getComputedStyle(u).getPropertyValue("opacity") && (u.style.cssText = "opacity: 1; transform: translateX(-38px)")) : (0 === o && r.classList.remove("nav-fixed", "nav-visible"), u.style.cssText = "opacity: ''; transform: ''"), document.body.scrollHeight <= f && (u.style.cssText = "opacity: 1; transform: translateX(-38px)") + }, 200))) + } function S() { var t = document.getElementById("card-toc"), r = t.getElementsByClassName("toc-content")[0], @@ -238,7 +238,7 @@ document.addEventListener("DOMContentLoaded", function () { })), l = document.getElementById("toggle-menu"), d = document.getElementById("sidebar-menus"), u = document.getElementById("menu-mask"), f = document.body, l.addEventListener("click", function () { btf.sidebarPaddingR(), f.style.overflow = "hidden", btf.fadeIn(u, .5), d.classList.add("open") }), window.addEventListener("resize", function (t) { - btf.isHidden(l) && d.classList.contains("open") && v() + btf.isHidden(l) && v() }), GLOBAL_CONFIG.isPhotoFigcaption && document.querySelectorAll("#article-container img").forEach(function (t) { var e, n = t.parentNode; n.parentNode.classList.contains("justified-gallery") || ((e = document.createElement("div")).className = "img-alt is-center", e.textContent = t.getAttribute("alt"), n.insertBefore(e, t.nextSibling)) diff --git a/templates/assets/zhheo/blogex.js b/templates/assets/zhheo/blogex.js index 17323445..a6cfac0a 100644 --- a/templates/assets/zhheo/blogex.js +++ b/templates/assets/zhheo/blogex.js @@ -263,7 +263,7 @@ $(window).on("keyup", function (e) { }); document.addEventListener("pjax:send", function () { - heo.showLoading() + //heo.showLoading() }); document.addEventListener("load", function () { diff --git a/templates/modules/head.html b/templates/modules/head.html index a49d6928..3f454cf0 100644 --- a/templates/modules/head.html +++ b/templates/modules/head.html @@ -11,12 +11,12 @@ - - +