Created
February 3, 2016 22:22
-
-
Save hellosteadman/7265879abddd8fc63e85 to your computer and use it in GitHub Desktop.
Acast embed bookmarklet
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
( | |
function() { | |
var found = false; | |
Array.prototype.forEach.call( | |
document.querySelectorAll('.player-embedded-v2 iframe'), | |
function(iframe, index) { | |
var src = iframe.getAttribute('src'); | |
var width = 640; | |
var height = 80; | |
var iframe = '<iframe src="' + src + '" width="' + width + '" height="' + height + '" frameborder="0"></iframe>'; | |
prompt('Try copying this text into your post', iframe); | |
found = true; | |
} | |
); | |
if(!found) { | |
alert('Oh bums; couldn\'t find any embeddable players :('); | |
} | |
} | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment