Skip to content

Instantly share code, notes, and snippets.

@bdalziel
Created February 25, 2013 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bdalziel/5032724 to your computer and use it in GitHub Desktop.
Save bdalziel/5032724 to your computer and use it in GitHub Desktop.
Dynamic Pinterest Button iFrame HTML
<html>
<head>
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js" type="text/javascript"></script>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<div class="buttonPlaceholder"></div>
<script type="text/javascript">
YUI({
combine: true,
timeout: 10000,
ignore: ["muse-pin-it-button"],
modules: {
pinterestPinit: {
fullpath: "http://assets.pinterest.com/js/pinit.js"
},
pageSpecific: {
fullpath: "http://static2.glo.com/cache/js/1361573141/cGluSXRCdXR0b24uanM..js"
}
}
}).use("pageSpecific","muse-pin-it-button","node","querystring-parse", function (Y) {
var init = function() {
Y.log("INIT: Page");
var a = function(){ try {Y.PinItButton.init()} catch (err) {Y.log('initErrorCatch:'+err.message);return false}};
a();
};
Y.on('domready', init);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment