Skip to content

Instantly share code, notes, and snippets.

@johnantoni
Created February 16, 2012 15:41
Show Gist options
  • Select an option

  • Save johnantoni/1845721 to your computer and use it in GitHub Desktop.

Select an option

Save johnantoni/1845721 to your computer and use it in GitHub Desktop.
https pin-it pinterest code
:javascript
(function() {
window.PinIt = window.PinIt || { loaded:false };
if (window.PinIt.loaded) return;
window.PinIt.loaded = true;
function async_load(){
var s = document.createElement("script");
s.type = "text/javascript";
s.async = true;
s.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'assets.pinterest.com/js/pinit.js';
var x = document.getElementsByTagName("script")[0];
x.parentNode.insertBefore(s, x);
}
if (window.attachEvent)
window.attachEvent("onload", async_load);
else
window.addEventListener("load", async_load, false);
})();
@johnantoni

Copy link
Copy Markdown
Author

augmentation to the generic pinterest pin-it code

http://pinterest.com/about/goodies/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment