AalekhN has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/110883

Change subject: jquery.fullscreen.js: Includes toggle handler in 
jquery.fullscreen
......................................................................

jquery.fullscreen.js: Includes toggle handler in jquery.fullscreen

This commit includes fullscreen toggle functionality in the file.

Bug: 57297
Change-Id: Ifabacb35a56a968737318f63ac08943ba7d326d8
---
M resources/jquery/jquery.fullscreen.js
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/83/110883/1

diff --git a/resources/jquery/jquery.fullscreen.js 
b/resources/jquery/jquery.fullscreen.js
index 0159079..2deed53 100644
--- a/resources/jquery/jquery.fullscreen.js
+++ b/resources/jquery/jquery.fullscreen.js
@@ -173,4 +173,20 @@
                        return this;
                }
        };
+       /**Toogle the fullscreen handling ,exit the fullscreen mode if present
+       *in fullscreen mode and enters the fullscreen mode if not present in 
+       *fullscreen mode
+       *@return {jquery}
+       **/
+       $.fn.toggleFullscreen = function () {
+               if( this.get(0) === fullscreenElement  ){
+                       $fn.enterFullscreen = enterFullscreen;
+                       return this.enterFullscreen();
+               }
+               else{
+                       $fn.exitFullscreen = exitFullscreen;
+                       return this.exitFullscreen();
+               }
+       };
+
 }( jQuery ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/110883
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifabacb35a56a968737318f63ac08943ba7d326d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: AalekhN <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to