Skip to content

Commit 25e64c7

Browse files
committed
chore: fix disqus loader
1 parent 1b61f45 commit 25e64c7

File tree

1 file changed

+28
-27
lines changed

1 file changed

+28
-27
lines changed

index.html

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3796,34 +3796,35 @@ <h6 class="card-header text-light bg-success">
37963796
<h2>Comments</h2>
37973797
<hr />
37983798
</div>
3799-
<div id="commentContainer">
3800-
<div style="text-align: center;">
3801-
<button
3802-
class="btn btn-primary"
3803-
onclick="
3804-
document.getElementById('commentContainer').innerHTML = document.getElementById('disqusLoader').innerHTML.replace(/screeept/g, 'script');
3805-
"
3806-
>
3807-
Load Comments
3808-
</button>
3809-
</div>
3810-
<script type="text/html" id="disqusLoader">
3811-
<div id="disqus_thread"></div>
3812-
<screeept type="text/javascript">
3813-
var disqus_config = function () {
3814-
this.page.url = 'https://sciactive.com/pnotify/';
3815-
this.page.identifier = 'demo';
3816-
};
3817-
(function() { // DON'T EDIT BELOW THIS LINE
3818-
var d = document, s = d.createElement('script');
3819-
s.src = 'https://pnotify.disqus.com/embed.js';
3820-
s.setAttribute('data-timestamp', +new Date());
3821-
(d.head || d.body).appendChild(s);
3822-
})();
3823-
</screeept>
3824-
<a href="https://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
3825-
</script>
3799+
<div id="commentLoader" style="text-align: center;">
3800+
<button
3801+
class="btn btn-primary"
3802+
onclick="
3803+
loadDisqus();
3804+
(node => node.parentNode.removeChild(node))(document.getElementById('commentLoader'));
3805+
"
3806+
>
3807+
Load Comments
3808+
</button>
38263809
</div>
3810+
<div id="disqus_thread"></div>
3811+
<a href="https://disqus.com" class="dsq-brlink"
3812+
>comments powered by <span class="logo-disqus">Disqus</span></a
3813+
>
3814+
<script type="text/javascript">
3815+
var disqus_config = function() {
3816+
this.page.url = 'https://sciactive.com/pnotify/';
3817+
this.page.identifier = 'demo';
3818+
};
3819+
function loadDisqus() {
3820+
// DON'T EDIT BELOW THIS LINE
3821+
var d = document,
3822+
s = d.createElement('script');
3823+
s.src = 'https://pnotify.disqus.com/embed.js';
3824+
s.setAttribute('data-timestamp', +new Date());
3825+
(d.head || d.body).appendChild(s);
3826+
}
3827+
</script>
38273828
</div>
38283829
<p id="copyright">&copy; 2011-2020 Hunter Perrin. All Rights Reserved.</p>
38293830

0 commit comments

Comments
 (0)