🐛 Fix: giscus default theme maybe set error

This commit is contained in:
Cell
2024-12-30 11:32:33 +08:00
parent 30a67c4b52
commit 1e59a684a6
2 changed files with 2 additions and 9 deletions
+1 -8
View File
@@ -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);
+1 -1
View File
@@ -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" . -}}