注释一些报错代码
This commit is contained in:
parent
217f0bd025
commit
95e6e460ae
|
@ -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"))
|
||||
}
|
||||
};
|
|
@ -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))
|
||||
|
|
|
@ -263,7 +263,7 @@ $(window).on("keyup", function (e) {
|
|||
});
|
||||
|
||||
document.addEventListener("pjax:send", function () {
|
||||
heo.showLoading()
|
||||
//heo.showLoading()
|
||||
});
|
||||
|
||||
document.addEventListener("load", function () {
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
<script th:src="@{/assets/js/heo.js}"></script>
|
||||
|
||||
<link rel="stylesheet" th:href="@{/assets/zhheo/zhheoblog.css}">
|
||||
<!-- fontawesome-pro https://github.com/duyplus/fontawesome-pro -->
|
||||
<link th:href="@{/assets/fontawesome-pro/v6.2.0/css/all.min.css}"
|
||||
<!-- fontawesome-pro https://github.com/duyplus/fontawesome-pro 对应目录下没有这个文件,先注释掉 -->
|
||||
<!-- <link th:href="@{/assets/fontawesome-pro/v6.2.0/css/all.min.css}"
|
||||
media="print"
|
||||
onload='this.media="all"'
|
||||
rel="stylesheet"
|
||||
/>
|
||||
/> -->
|
||||
|
||||
<!-- 右下角通知 -->
|
||||
<link href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/node-snackbar/0.1.16/snackbar.min.css"
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
$(this).attr('id', headerId);
|
||||
}
|
||||
});
|
||||
// TODO 可以没有目录
|
||||
tocbot.init({
|
||||
// Where to render the table of contents.
|
||||
tocSelector: '.toc-content',
|
||||
|
|
Loading…
Reference in New Issue