From ed1412600122bd4bbfe957e82300eec1e7c595d1 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Tue, 8 Apr 2025 11:01:44 +0800 Subject: [PATCH] :bug: Fix: that using `music` shortcode can cause toc freezing Resolved #577 --- assets/js/theme.js | 4 ++-- layouts/partials/init/index.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/theme.js b/assets/js/theme.js index e32b9b1a..99c07b57 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -1071,10 +1071,10 @@ class FixIt { this.initEcharts(); this.initTypeit(); this.initMapbox(); + this.fixTocScroll(); this.initToc(); this.initTocListener(); this.initPangu(); - this.fixTocScroll(); this.util.forEach(document.querySelectorAll('.encrypted-hidden'), ($element) => { $element.classList.replace('encrypted-hidden', 'decrypted-shown'); }); @@ -1310,9 +1310,9 @@ class FixIt { window.setTimeout(() => { this.initComment(); if (!this.config.encryption?.all) { + this.fixTocScroll(); this.initToc(); this.initTocListener(); - this.fixTocScroll(); } this.onScroll(); this.onResize(); diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index 9abb3730..a87bf468 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "v0.3.17-2b936cb6" -}} +{{- .Scratch.Set "version" "v0.3.17-22c3353d" -}} {{- .Scratch.Set "this" dict -}} {{- partial "init/detection-env.html" . -}}