How much does adding twitter java script affect page load?
Quote:
Originally Posted by Gamempire
my mod with automatic tweet icon (no need to upload nothing):
Code:
<!-- Facebook Share -->
<li>
<a name="fb_share" type="icon_link" href="http://www.facebook.com/sharer.php">Facebook</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</li>
<!-- / Facebook Share -->
<li>
<img src="http://a1.twimg.com/a/1265328866/images/favicon.ico" align="left" style="margin:5px 5px 0 10px;" />
<!-- Twitter Share -->
<script type="text/javascript">
var twtTitle = document.title;
var twtUrl = location.href;
var maxLength = 140 - (twtUrl.length + 1);
if (twtTitle.length > maxLength) {
twtTitle = twtTitle.substr(0, (maxLength - 3))+'...';
}
var twtLink = 'http://twitter.com/home?status='+encodeURIComponent(twtTitle + ' ' + twtUrl);
document.write('<a href="'+twtLink+'" target="_blank"'+'>Tweet This!<'+'/a>');
</script>
<!-- / Twitter Share -->
</li>
</ul>
</li>
<!-- End Share FB -->
|