diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-09-02 13:24:55 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-09-02 13:24:55 -0400 |
| commit | 8def9579f2a78e80652d1e5e6f1eda510ae9a5dd (patch) | |
| tree | c56d664f04d55f0d75c6d4f5e2d6fc567054498d /site/public/assets/javascripts/vendor/polyfill.js | |
| parent | 4ed81fa59119cee66b0413c5662639ec81fea4dc (diff) | |
| parent | 5052d51aa4c55eabc736b3c76a783db2f5208289 (diff) | |
merge changes from twohustlers
Diffstat (limited to 'site/public/assets/javascripts/vendor/polyfill.js')
| -rw-r--r-- | site/public/assets/javascripts/vendor/polyfill.js | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/site/public/assets/javascripts/vendor/polyfill.js b/site/public/assets/javascripts/vendor/polyfill.js index 411d90f..8c26e80 100644 --- a/site/public/assets/javascripts/vendor/polyfill.js +++ b/site/public/assets/javascripts/vendor/polyfill.js @@ -97,4 +97,34 @@ function fullscreen (el) { } else if (el.webkitRequestFullscreen) { el.webkitRequestFullscreen(); } -}
\ No newline at end of file +} + +/* + * Proper fullscreen detection using the HTML5 + * Full Screen API. Not supported on mobile or + * IE10 and under + * TODO Need to disable fullscreen button on IE10 and lower + */ +function isFullScreen() { + return !!getFullScreenElement() +} + +function getFullScreenElement() { + return document.fullScreenElement || + document.webkitFullscreenElement || + document.mozFullScreenElement || + document.msFullscreenElement +} + +var raf = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame + +var caf = window.cancelAnimationFrame || + window.webkitCancelAnimationFrame || + window.mozCancelAnimationFrame || + window.oCancelAnimationFrame || + window.msCancelAnimationFrame + |
