Sha256: 132217ef54d62ef6dabcd56a374e99b29ec1e8b930b6c208547c646eb9722b5d

Contents?: true

Size: 1.41 KB

Versions: 8

Compression:

Stored size: 1.41 KB

Contents

<!-- The Disqus lazy loading. -->
<div id="disqus_thread" class="pt-2 pb-2">
  <p class="text-center text-muted small">Comments powered by <a href="https://disqus.com/">Disqus</a>.</p>
</div>

<script type="text/javascript">
  var disqus_config = function () {
    this.page.url = '{{ page.url | absolute_url }}';
    this.page.identifier = '{{ page.url }}';
  };

  /* Lazy loading */
  var disqus_observer = new IntersectionObserver(
    function (entries) {
      if (entries[0].isIntersecting) {
        (function () {
          var d = document,
            s = d.createElement('script');
          s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
          s.setAttribute('data-timestamp', +new Date());
          (d.head || d.body).appendChild(s);
        })();

        disqus_observer.disconnect();
      }
    },
    { threshold: [0] }
  );

  disqus_observer.observe(document.querySelector('#disqus_thread'));

  /* Auto switch theme */
  function reloadDisqus() {
    if (event.source === window && event.data && event.data.direction === ModeToggle.ID) {
      /* Disqus hasn't been loaded */
      if (typeof DISQUS === 'undefined') {
        return;
      }

      if (document.readyState == 'complete') {
        DISQUS.reset({ reload: true, config: disqus_config });
      }
    }
  }

  if (document.querySelector('.mode-toggle')) {
    window.addEventListener('message', reloadDisqus);
  }
</script>

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
jekyll-theme-chirpy-birdly-6.1.2 _includes/comments/disqus.html
jekyll-theme-chirpy-birdly-6.1.0 _includes/comments/disqus.html
jekyll-theme-chirpy-birdly-6.1.1 _includes/comments/disqus.html
jekyll-theme-chirpy-6.1.0 _includes/comments/disqus.html
jekyll-theme-chirpy-birdly-6.0.2 _includes/comments/disqus.html
jekyll-theme-chirpy-6.0.1 _includes/comments/disqus.html
jekyll-theme-chirpy-6.0.0 _includes/comments/disqus.html
jekyll-theme-chirpy-5.6.1 _includes/comments/disqus.html