Skip to content

Commit

Permalink
🐛 Fix: giscus default theme maybe set error
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Dec 30, 2024
1 parent 30a67c4 commit 1e59a68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions assets/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/init/index.html
Original file line number Diff line number Diff line change
@@ -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" . -}}
Expand Down

0 comments on commit 1e59a68

Please sign in to comment.