Skip to content

Instantly share code, notes, and snippets.

@gggritso
Last active August 29, 2015 14:06
Show Gist options
  • Save gggritso/9cc3672d166eaa47f2cc to your computer and use it in GitHub Desktop.
Save gggritso/9cc3672d166eaa47f2cc to your computer and use it in GitHub Desktop.
MeatPause
( function() {
document.addEventListener( 'click', function( event ) {
var target = event.target;
if ( !target || target.nodeName !== 'VIDEO' ) { return; }
if ( target.paused ) {
target.play();
} else {
target.pause();
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment