Skip to content

Instantly share code, notes, and snippets.

@le4ker
Last active September 6, 2019 00:16
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 le4ker/6808d43003d27f28d533ff55583f09a2 to your computer and use it in GitHub Desktop.
Save le4ker/6808d43003d27f28d533ff55583f09a2 to your computer and use it in GitHub Desktop.
Blocktopus embed iframe for signing-in to third-party service
<html>
<body>
<script>
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";
}
else if (event.data.event_id == 'blocktopus_token') {
console.log(event.data.value);
}
}
</script>
<iframe id='blocktopus_iframe' src="https://embed.blocktopus.io/token_buyers/sign_in?organization=eubx" width="100%" height="500px"/>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment