diff options
author | Hakim El Hattab | 2013-09-04 08:56:50 -0400 |
---|---|---|
committer | Hakim El Hattab | 2013-09-04 08:56:50 -0400 |
commit | 2578fddd3fb00686050b987305fb8380b1da916a (patch) | |
tree | 2a5d063a13c0b34d14c20f053439a7759e8a0085 /js/reveal.js | |
parent | 7cd4af80a6c851a201fdf2bdd93ac0aadcab0155 (diff) |
enable hiding of address bar for ios chrome #582
Diffstat (limited to 'js/reveal.js')
-rw-r--r-- | js/reveal.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js index c04a9f0..e1cd623 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -767,7 +767,7 @@ var Reveal = (function(){ */ function hideAddressBar() { - if( /iphone|ipod|android/gi.test( navigator.userAgent ) && !/crios/gi.test( navigator.userAgent ) ) { + if( isMobileDevice ) { // Events that should trigger the address bar to hide window.addEventListener( 'load', removeAddressBar, false ); window.addEventListener( 'orientationchange', removeAddressBar, false ); @@ -781,7 +781,8 @@ var Reveal = (function(){ */ function removeAddressBar() { - if( window.orientation === 0 ) { + // Portrait and not Chrome for iOS + if( window.orientation === 0 && !/crios/gi.test( navigator.userAgent ) ) { document.documentElement.style.overflow = 'scroll'; document.body.style.height = '120%'; } |