Skip to content

Instantly share code, notes, and snippets.

@NicolasPio
Created November 11, 2014 13:30
Show Gist options
  • Select an option

  • Save NicolasPio/79b6c9bb0fee7fb1c2fe to your computer and use it in GitHub Desktop.

Select an option

Save NicolasPio/79b6c9bb0fee7fb1c2fe to your computer and use it in GitHub Desktop.
Social buttons asynchronous
<!-- Twitter -->
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.async=true;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
</script>
<!-- Google Plus -->
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment