55 * Licensed under the MIT license
66 * (See http://www.opensource.org/licenses/mit-license)
77 */
8-
8+
99( function ( jQuery ) {
1010
1111/**
1212 * Sets or gets the fullscreen state.
13- *
13+ *
1414 * @param {boolean= } state
1515 * True to enable fullscreen mode, false to disable it. If not
1616 * specified then the current fullscreen state is returned.
1717 * @return {boolean|Element|jQuery|null }
1818 * When querying the fullscreen state then the current fullscreen
1919 * element (or true if browser doesn't support it) is returned
2020 * when browser is currently in full screen mode. False is returned
21- * if browser is not in full screen mode. Null is returned if
22- * browser doesn't support fullscreen mode at all. When setting
23- * the fullscreen state then the current jQuery selection is
21+ * if browser is not in full screen mode. Null is returned if
22+ * browser doesn't support fullscreen mode at all. When setting
23+ * the fullscreen state then the current jQuery selection is
2424 * returned for chaining.
2525 * @this {jQuery}
2626 */
2727function fullScreen ( state )
2828{
2929 var e , func , doc ;
30-
30+
3131 // Do nothing when nothing was selected
3232 if ( ! this . length ) return this ;
33-
33+
3434 // We only use the first selected element because it doesn't make sense
3535 // to fullscreen multiple elements.
3636 e = ( /** @type {Element } */ this [ 0 ] ) ;
37-
37+
3838 // Find the real element and the document (Depends on whether the
3939 // document itself or a HTML element was selected)
4040 if ( e . ownerDocument )
@@ -46,7 +46,7 @@ function fullScreen(state)
4646 doc = e ;
4747 e = doc . documentElement ;
4848 }
49-
49+
5050 // When no state was specified then return the current state.
5151 if ( state == null )
5252 {
@@ -59,11 +59,11 @@ function fullScreen(state)
5959 {
6060 return null ;
6161 }
62-
62+
6363 // Check fullscreen state
6464 state = fullScreenState ( doc ) ;
6565 if ( ! state ) return state ;
66-
66+
6767 // Return current fullscreen element or "true" if browser doesn't
6868 // support this
6969 return ( /** @type {?Element } */ doc [ "fullscreenElement" ] )
@@ -73,7 +73,7 @@ function fullScreen(state)
7373 || ( /** @type {?Element } */ doc [ "mozFullScreenElement" ] )
7474 || state ;
7575 }
76-
76+
7777 // When state was specified then enter or exit fullscreen mode.
7878 if ( state )
7979 {
@@ -83,7 +83,7 @@ function fullScreen(state)
8383 || ( /** @type {?Function } */ e [ "webkitRequestFullScreen" ] )
8484 || ( /** @type {?Function } */ e [ "msRequestFullscreen" ] )
8585 || ( /** @type {?Function } */ e [ "mozRequestFullScreen" ] ) ;
86- if ( func )
86+ if ( func )
8787 {
8888 func . call ( e ) ;
8989 }
@@ -114,14 +114,14 @@ function fullScreenState(doc) {
114114
115115/**
116116 * Toggles the fullscreen mode.
117- *
117+ *
118118 * @return {!jQuery }
119119 * The jQuery selection for chaining.
120120 * @this {jQuery}
121121 */
122122function toggleFullScreen ( )
123123{
124- return ( /** @type {!jQuery } */ fullScreen . call ( this ,
124+ return ( /** @type {!jQuery } */ fullScreen . call ( this ,
125125 ! fullScreen . call ( this ) ) ) ;
126126}
127127
@@ -155,7 +155,7 @@ function fullScreenErrorHandler(event)
155155function installFullScreenHandlers ( )
156156{
157157 var e , change , error ;
158-
158+
159159 // Determine event name
160160 e = document ;
161161 if ( e [ "webkitCancelFullScreen" ] )
@@ -173,7 +173,7 @@ function installFullScreenHandlers()
173173 change = "mozfullscreenchange" ;
174174 error = "mozfullscreenerror" ;
175175 }
176- else
176+ else
177177 {
178178 change = "fullscreenchange" ;
179179 error = "fullscreenerror" ;
0 commit comments