diff --git a/app.js b/app.js index 5f0c8502e5..a8f114d0c6 100644 --- a/app.js +++ b/app.js @@ -1110,3 +1110,34 @@ function scrollChatToBottom() { $('#chatconversation').scrollTop($('#chatconversation')[0].scrollHeight); }, 5); } + + +/* + * Toggles the application in and out of full screen mode + * (a.k.a. presentation mode in Chrome). + */ +function toggleFullScreen() { + var fsElement = document.documentElement; + + if (!document.mozFullScreen && !document.webkitFullScreen){ + + //Enter Full Screen + if (fsElement.mozRequestFullScreen) { + + fsElement.mozRequestFullScreen(); + + } + else { + fsElement.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); + } + + } else { + + //Exit Full Screen + if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else { + document.webkitCancelFullScreen(); + } + } +} diff --git a/index.html b/index.html index 0313c597c4..e7a9f36d4d 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ - + @@ -35,6 +35,8 @@
+ +