code style
This commit is contained in:
parent
a143861478
commit
1421934fde
13
js/reveal.js
13
js/reveal.js
|
@ -615,15 +615,20 @@ var Reveal = (function(){
|
||||||
|
|
||||||
if( config.focusBodyOnPageVisiblityChange ) {
|
if( config.focusBodyOnPageVisiblityChange ) {
|
||||||
var visibilityChange;
|
var visibilityChange;
|
||||||
if ('hidden' in document) {
|
|
||||||
|
if( 'hidden' in document ) {
|
||||||
visibilityChange = 'visibilitychange';
|
visibilityChange = 'visibilitychange';
|
||||||
} else if ('msHidden' in document) {
|
}
|
||||||
|
else if( 'msHidden' in document ) {
|
||||||
visibilityChange = 'msvisibilitychange';
|
visibilityChange = 'msvisibilitychange';
|
||||||
} else if ('webkitHidden' in document) {
|
}
|
||||||
|
else if( 'webkitHidden' in document ) {
|
||||||
visibilityChange = 'webkitvisibilitychange';
|
visibilityChange = 'webkitvisibilitychange';
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener(visibilityChange, onPageVisibilityChange, false);
|
if( visibilityChange ) {
|
||||||
|
document.addEventListener( visibilityChange, onPageVisibilityChange, false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ 'touchstart', 'click' ].forEach( function( eventName ) {
|
[ 'touchstart', 'click' ].forEach( function( eventName ) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue