Free javascript Hosting


com.js

Uploaded on Apr 11 2022 04:27 by rikintosh

$('.blog-post-comments').each(function() {
var system = commentsSystem,
disqus_url = disqus_blogger_current_url,
disqus = '<div id="disqus_thread"/>',
current_url = $(location).attr('href'),
facebook = '<div class="fb-comments" data-width="100%" data-href="' + current_url + '" data-numposts="5"></div>',
sClass = 'comments-system-' + system;
if (system == 'blogger') {
$(this).addClass(sClass).show();
} else if (system == 'disqus') {
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqusShortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
$('#comments, #gpluscomments').remove();
$(this).append(disqus).addClass(sClass).show();
} else if (system == 'facebook') {
$('#comments, #gpluscomments').remove();
$(this).append(facebook).addClass(sClass).show();
} else if (system == 'hide') {
$(this).hide();
} else {
$(this).addClass('comments-system-default').show();
}
});

Back to list