enable hiding of address bar for ios chrome #582

edit
Hakim El Hattab 2013-09-04 08:56:50 -04:00
parent 7cd4af80a6
commit 2578fddd3f
2 changed files with 5 additions and 4 deletions

View File

@ -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%';
}

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long