Skip to content

Instantly share code, notes, and snippets.

@spite
Created January 19, 2014 15:23
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 spite/8506285 to your computer and use it in GitHub Desktop.
Save spite/8506285 to your computer and use it in GitHub Desktop.
Going Fullscreen
var c = document.body;
document.getElementById( 'fullscreenBtn' ).addEventListener( 'click', function( e ) {
c.onwebkitfullscreenchange = function(e) {
c.onwebkitfullscreenchange = function() {
};
};
c.onmozfullscreenchange = function(e) {
c.onmozfullscreenchange = function() {
};
};
if( c.webkitRequestFullScreen ) c.webkitRequestFullScreen();
if( c.mozRequestFullScreen ) c.mozRequestFullScreen();
e.preventDefault();
}, false );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment