diff options
author | Jacques Erasmus <jerasmus@gitlab.com> | 2019-10-21 12:02:53 +0300 |
---|---|---|
committer | Jacques Erasmus <jerasmus@gitlab.com> | 2019-10-21 12:02:53 +0300 |
commit | fa2d76aeb2cdb6eb7dcf95afdff957a1612d7da4 (patch) | |
tree | 6ee54845fd8a4ad8ae671329c8e59376c04e8077 | |
parent | c342f52d85c7b37101dd0a223f668ba3bd9040b6 (diff) |
Remove conditional to show Disqus comments
Temporarily commented the conditional to display disqus
-rw-r--r-- | content/frontend/bundles/feedback.js | 10 | ||||
-rw-r--r-- | layouts/feedback.html | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/content/frontend/bundles/feedback.js b/content/frontend/bundles/feedback.js new file mode 100644 index 00000000..88d35714 --- /dev/null +++ b/content/frontend/bundles/feedback.js @@ -0,0 +1,10 @@ +document.addEventListener( + 'DOMContentLoaded', + () => { + const hasCommentAnchor = window.location.hash.includes('#comment-'); + + if(hasCommentAnchor) { + loadDisqus(); + } + } +); diff --git a/layouts/feedback.html b/layouts/feedback.html index dfc9a72b..2ea56cb8 100644 --- a/layouts/feedback.html +++ b/layouts/feedback.html @@ -242,5 +242,6 @@ } }; </script> + <script src="<%= @items['/frontend/bundles/feedback.*'].path %>"></script> <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript> <% end %> |