Skip to content

Instantly share code, notes, and snippets.

@le4ker
Created September 16, 2019 20:42
Show Gist options
  • Save le4ker/38b015482eea2fd579f92b539246d677 to your computer and use it in GitHub Desktop.
Save le4ker/38b015482eea2fd579f92b539246d677 to your computer and use it in GitHub Desktop.
Embed Blocktopus to a Token Sale landing page
<html>
<body>
<script>
// The following Javascript resizes the iframe's height when Blocktopus' embeded page's height changes
window.addEventListener("message", receiveMessage, false);
function receiveMessage(event) {
if (event.data.event_id == 'blocktopus_height') {
iframe = document.getElementById("blocktopus_iframe");
iframe.height = event.data.value + "px";
}
}
</script>
<iframe id='blocktopus_iframe' src="https://embed.blocktopus.io/token_buyers/sign_in?organization=REGISTERED_ORGANIZATION_NAME" width="100%" height="500px"/>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment