From c23d9103bfb3a8de6ff2d0d01e8526d48e6d933c Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Thu, 14 Sep 2023 20:26:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A0=E7=89=A9=E6=8C=82=E4=BB=B6=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/js/halo.js | 18 +++++------------- templates/assets/zhheo/zhheoblog.css | 2 +- templates/modules/moment.html | 1 + 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/templates/assets/js/halo.js b/templates/assets/js/halo.js index 05cddf7b..138ae7be 100644 --- a/templates/assets/js/halo.js +++ b/templates/assets/js/halo.js @@ -34,9 +34,6 @@ let halo = { return; } - - - const enable = GLOBAL_CONFIG.prism.enable; if (!enable) return; const isEnableTitle = GLOBAL_CONFIG.prism.enable_title; @@ -133,9 +130,6 @@ let halo = { return settings; } - - - var r = Prism.plugins.toolbar.hook = function (a) { @@ -181,8 +175,6 @@ let halo = { } - - const prismToolsFn = function (e) { const $target = e.target.classList; if ($target.contains("code-expander")) prismShrinkFn(this); @@ -200,7 +192,6 @@ let halo = { } - const expandCode = function () { this.classList.toggle("expand-done"); this.style.display = "none"; @@ -217,9 +208,6 @@ let halo = { r.offsetParent.appendChild(ele); } - - - const prismShrinkFn = ele => { const $nextEle = r.offsetParent.lastElementChild.classList toolbar.classList.toggle('c-expander') @@ -269,7 +257,6 @@ let halo = { document.head.appendChild(a) }, - danmu: (url,token,maxBarrage)=>{ const e = new EasyDanmakuMin({ el: "#danmu", @@ -314,6 +301,11 @@ let halo = { )) } document.getElementById("danmuBtn").innerHTML = " " + }, + + changeMarginLeft(element) { + var randomMargin = Math.floor(Math.random() * 901) + 100; // 生成100-1000之间的随机数 + element.style.marginLeft = randomMargin + 'px'; } diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css index 056a764a..c0a09263 100644 --- a/templates/assets/zhheo/zhheoblog.css +++ b/templates/assets/zhheo/zhheoblog.css @@ -8480,7 +8480,7 @@ li { display: block; position: absolute; max-width: 270px; - z-index: 1; + z-index: 2; margin-top: -26.6px; margin-left: 5px; cursor: pointer diff --git a/templates/modules/moment.html b/templates/modules/moment.html index f8681e26..c69270ec 100644 --- a/templates/modules/moment.html +++ b/templates/modules/moment.html @@ -33,6 +33,7 @@