Merge "Fix ParserOutput::getText 'unwrap' flag for end-of-doc comment"
[lhc/web/wiklou.git] / resources / src / oojs-ui-local.js
index 99d9784..0c65512 100644 (file)
@@ -1,10 +1,17 @@
 ( function ( mw ) {
-       // Connect OOjs UI to MediaWiki's localisation system
+       var isMobile;
+       // Connect OOUI to MediaWiki's localisation system
        OO.ui.getUserLanguages = mw.language.getFallbackLanguageChain;
        OO.ui.msg = mw.msg;
-       // Connect OOjs UI's deprecation warnings to MediaWiki's logging system
+       // Connect OOUI's deprecation warnings to MediaWiki's logging system
        OO.ui.warnDeprecation = function ( message ) {
                mw.track( 'mw.deprecate', 'oojs-ui' );
                mw.log.warn( message );
        };
+       OO.ui.isMobile = function () {
+               if ( isMobile === undefined ) {
+                       isMobile = !!mw.config.get( 'wgMFMode' );
+               }
+               return isMobile;
+       };
 }( mediaWiki ) );