aboutsummaryrefslogtreecommitdiff
path: root/js/reveal.js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2013-10-10 09:20:54 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2013-10-10 09:21:06 -0400
commit1421934fde119e20cee8490a5fb57f8db825b9c0 (patch)
tree1980c4171b689a272b6eca1a61581b4ad5a7933e /js/reveal.js
parenta14386147812f487572066b1f8b69df6bff46d2e (diff)
downloadfosdem-2018-presentation-1421934fde119e20cee8490a5fb57f8db825b9c0.tar
fosdem-2018-presentation-1421934fde119e20cee8490a5fb57f8db825b9c0.tar.gz
code style
Diffstat (limited to 'js/reveal.js')
-rw-r--r--js/reveal.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 600a763..e6368d6 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -615,15 +615,20 @@ var Reveal = (function(){
if( config.focusBodyOnPageVisiblityChange ) {
var visibilityChange;
- if ('hidden' in document) {
+
+ if( 'hidden' in document ) {
visibilityChange = 'visibilitychange';
- } else if ('msHidden' in document) {
+ }
+ else if( 'msHidden' in document ) {
visibilityChange = 'msvisibilitychange';
- } else if ('webkitHidden' in document) {
+ }
+ else if( 'webkitHidden' in document ) {
visibilityChange = 'webkitvisibilitychange';
}
- document.addEventListener(visibilityChange, onPageVisibilityChange, false);
+ if( visibilityChange ) {
+ document.addEventListener( visibilityChange, onPageVisibilityChange, false );
+ }
}
[ 'touchstart', 'click' ].forEach( function( eventName ) {