summaryrefslogtreecommitdiff
path: root/layouts/_partials/posts/comment.html
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-10-28 10:53:01 +0800
committerEltrac <hi@guhub.cn>2025-10-28 10:53:01 +0800
commit1996f2269175b3bca9df75368f4219d7e99ab767 (patch)
tree24d3f9aa1d7206170cc1e489e245e62bb2c59bfc /layouts/_partials/posts/comment.html
parente6d19b87c97c59b52452a7d3e6d914929b254405 (diff)
perf: load giscus in idle time
Former-commit-id: c1fe34f2476a0a1e52e70c996f8b07a4119ebf32
Diffstat (limited to 'layouts/_partials/posts/comment.html')
-rw-r--r--layouts/_partials/posts/comment.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_partials/posts/comment.html b/layouts/_partials/posts/comment.html
index 8a08e816..78621c22 100644
--- a/layouts/_partials/posts/comment.html
+++ b/layouts/_partials/posts/comment.html
@@ -56,5 +56,5 @@ function loadGiscus() {
document.body.appendChild(script);
}
-document.addEventListener('DOMContentLoaded', loadGiscus);
+window.addEventListener("load", () => { requestIdleCallback(() => loadGiscus()); });
</script>