Skip to content

Instantly share code, notes, and snippets.

@kpping
Last active March 5, 2021 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kpping/60f19bac5a684c9da91b6e991d9605f9 to your computer and use it in GitHub Desktop.
Save kpping/60f19bac5a684c9da91b6e991d9605f9 to your computer and use it in GitHub Desktop.
fix-disqus-page-speed-score-on-hugo #02
<div id="disqus_thread" style="min-height: 100px;">
<div id="disqus_thread_loader">กำลังโหลดความคิดเห็น ..</div>
</div>
<script type="text/javascript">
var disqus_config=function(){this.page.identifier="{{ .Page.File.UniqueID }}"},disqus_observer=new IntersectionObserver(function(e){var s,t;e[0].isIntersecting&&(s=document,(t=s.createElement("script")).async=!0,t.src="//{{ .Site.DisqusShortname }}.disqus.com/embed.js",t.setAttribute("data-timestamp",+new Date),(s.head||s.body).appendChild(t),disqus_observer.disconnect())},{threshold:[0]});disqus_observer.observe(document.querySelector("#disqus_thread"));
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment