diff options
| author | julie lala <jules@okfoc.us> | 2015-05-17 08:07:06 -0400 |
|---|---|---|
| committer | julie lala <jules@okfoc.us> | 2015-05-17 08:07:06 -0400 |
| commit | 45197dbb5a49c75509d95fae072f828bdbc7e13e (patch) | |
| tree | b9e177b49203d6e73b3c9e15f8ce59b8b32b50c8 /site/public/assets/javascripts/vendor/polyfill.js | |
| parent | 7f84dfb770ac2f9bae282ef00d9a93f21255fa45 (diff) | |
| parent | a0d2729e311f53ecaa014c097c1a485581853100 (diff) | |
Merge branch 'twohustlers' of github.com:okfocus/okcms into 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 + |
