Skip to content

Instantly share code, notes, and snippets.

@alexyoung
Created February 14, 2009 11:44
Show Gist options
  • Save alexyoung/64346 to your computer and use it in GitHub Desktop.
Save alexyoung/64346 to your computer and use it in GitHub Desktop.
<script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#tabs=web%2Cpost%2Cemail&amp;charset=utf-8&amp;style=default&amp;publisher=lolz"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"></script>
<script language="javascript" type="text/javascript">
document.observe('dom:loaded', function() {
$$('.ShareThis').each(function(element) {
element.innerHTML = '<a class="stbutton stico_default" title="ShareThis via email, AIM, social bookmarking and networking sites, etc." href="javascript:void(0)"><span class="stbuttontext">ShareThis</span></a>';
var title = element.previous('h2').down('a').innerHTML;
var url = element.previous('h2').down('a').href;
var shareObject = SHARETHIS.addEntry({
title: title,
url: url
}, {button:false} );
shareObject.attachButton(element);
})
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment