The Addthis no longer works for blogger

kevinmclarke May 14, 2012 01:43AM EDT

I tried to post the Addthis counter with the following code and it would not post in Blogger. I believe that others are having this problem as well. Please advise.

Thank you!

Kevin M. Clarke


<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4fb0774a3e1d899b"></script>
<script type='text/javascript'>
document.doAT = function(cl)
{
var myclass = new RegExp('hentry');
var myTitleContainer = new RegExp('post-title');
var myPostContent = new RegExp('post-footer');
var elem = this.getElementsByTagName('div');
for (var i = 0; i < elem.length; i++)
{
var classes = elem[i].className;
if (myclass.test(classes))
{
var container = elem[i];
for (var b = 0; b < container.childNodes.length; b++)
{
var item = container.childNodes[b].className;
if (myTitleContainer.test(item))
{
var link = container.childNodes[b].getElementsByTagName('a');
if (typeof(link[0]) != 'undefined')
{
var url = link[0].href;
var title = link[0].innerHTML;
}
else
{
var url = document.url;
var title = container.childNodes[b].innerHTML;
}
if (typeof(url) == 'undefined'|| url == 'undefined' ){
url = window.location.href;
}
var singleq = new RegExp("'", 'g');
var doubleq = new RegExp('"', 'g');
title = title.replace(singleq, '&#39;', 'gi');
title = title.replace(doubleq, '&#34;', 'gi');

}
if (myPostContent.test(item))
{
var footer = container.childNodes[b];
}
}
var n = document.createElement('div');
var at = "<div class='addthis_toolbox addthis_default_style ' addthis:title='"+title+"' addthis:url='"+encodeURI(url)+"' > <a class='addthis_button_facebook_like' fb:like:layout='button_count'></a> <a class='addthis_button_tweet'></a> <a class='addthis_button_google_plusone' g:plusone:size='medium'></a> <a class='addthis_counter addthis_pill_style'></a> </div> ";
n.innerHTML = at;
container.insertBefore(n , footer);
}
}
return true;
};

document.doAT('hentry');
</script>

Up 0 Rated Down
Sol (AddThis Happiness Specialist) May 14, 2012 01:50PM EDT
Hi Kevin, could you provide me a link to your blog so I can look at the code? We have identified a defect and are working on it, but I want to make sure your issue is either covered under the same defect or submit another defect on your behalf.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Still need help?


General Topics

 

Developers