Skip to content

Instantly share code, notes, and snippets.

@hellosteadman
Created February 3, 2016 22:22
Show Gist options
  • Save hellosteadman/7265879abddd8fc63e85 to your computer and use it in GitHub Desktop.
Save hellosteadman/7265879abddd8fc63e85 to your computer and use it in GitHub Desktop.
Acast embed bookmarklet
(
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