Last active
August 29, 2015 14:06
-
-
Save gggritso/9cc3672d166eaa47f2cc to your computer and use it in GitHub Desktop.
MeatPause
This file contains 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() { | |
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