Permalink
Browse files

mudando javascript para carregar assincronamente

  • Loading branch information...
1 parent d731489 commit 97d72a688379a44c213a1078b924bd95fcfa51d3 @jonasabreu committed May 29, 2012
Showing with 17 additions and 3 deletions.
  1. +17 −3 _layouts/default.html
View
@@ -74,9 +74,23 @@
</div>
</div>
- <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
- <script src='http://platform.twitter.com/widgets.js' type="text/javascript"></script>
- <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
+ <!-- Social Media Async-->
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+ <script type="text/javascript">
+ (function() {
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
+ po.src = 'https://apis.google.com/js/plusone.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
+ })();
+</script>
+ <script>(function(d, s, id) {
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) return;
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
+ fjs.parentNode.insertBefore(js, fjs);
+}(document, 'script', 'facebook-jssdk'));</script>
+
{% if site.github %}
<a href="http://github.com/{{ site.github.username }}"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a>

0 comments on commit 97d72a6

Please sign in to comment.