Skip to content

Instantly share code, notes, and snippets.

@wombleton
Created February 10, 2014 10:15
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 wombleton/8913469 to your computer and use it in GitHub Desktop.
Save wombleton/8913469 to your computer and use it in GitHub Desktop.
(function() {
var container = document.createElement('div'),
el;
container.innerHTML = '<iframe width="420" height="315" src="//www.youtube.com/embed/u8drRfc69NA?autoplay=1&start=7" frameborder="0" allowfullscreen style="position:fixed;top:20px;left:50%;margin-left:-210px;z-index:10000"></iframe>';
el = container.children[0];
document.body.appendChild(el);
function remove() {
document.body.removeChild(el);
document.body.removeEventListener('click', remove, false);
}
document.body.addEventListener('click', remove, false);
}).call(this);
@wombleton
Copy link
Author

Copy and paste into chrome's developer tools for a demo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment