Last active
July 2, 2018 10:38
-
-
Save slb235/42f66fc8818ae511e165559774a3e629 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iframe = document.getElementById('abembed') | |
var match = document.URL.match(/result=([a-z0-9]+)/i) | |
if(match) { | |
iframe.src = 'https://en.actionbound.com/result/' + match[1] + '?t=wilderwander' | |
} | |
else { | |
console.error("cant find result in url", document.URL) | |
} | |
iFrameResize({heightCalculationMethod: 'bodyScroll'}, '#abembed') | |
window.addEventListener("message", function(e) { | |
if(e.data && e.data.url && e.data.action === 'open') { | |
window.location.href = e.data.url | |
} | |
}, false) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment