diff --git a/assets/js/theme.js b/assets/js/theme.js index 78f485b2..e32b9b1a 100644 --- a/assets/js/theme.js +++ b/assets/js/theme.js @@ -962,14 +962,7 @@ class FixIt { if ($script){ $script.parentElement.removeChild($script); } - const frame = document.querySelector('.giscus-frame'); - if (frame.getAttribute('loading') === 'lazy') { - frame.addEventListener('load', (e) => { - this._giscusOnSwitchTheme(); - }, { once: true }); - } else { - this._giscusOnSwitchTheme(); - } + this._giscusOnSwitchTheme() window.removeEventListener('message', this._messageListener, false); }; window.addEventListener('message', this._messageListener, false); diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index a29dda5c..8a53f4e2 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "v0.3.17-469af95f" -}} +{{- .Scratch.Set "version" "v0.3.17-30a67c4b" -}} {{- .Scratch.Set "this" dict -}} {{- partial "init/detection-env.html" . -}}