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
commitc1fe34f2476a0a1e52e70c996f8b07a4119ebf32 (patch)
treebf22006e4102b4b0369b2f51647b33f85c773399 /layouts/_partials/posts/comment.html
parent22c3e1795d987d2fec000ca0ba68c57b5e4bfca2 (diff)
perf: load giscus in idle time
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>