Jdlrobson has uploaded a new change for review.

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

Change subject: DONOTMERGE: test...
......................................................................

DONOTMERGE: test...

Change-Id: If37a623f1571645a040c10fc7c5304c7ee0fd332
---
D resources/mobile.startup/init.js
1 file changed, 0 insertions(+), 116 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/49/229449/1

diff --git a/resources/mobile.startup/init.js b/resources/mobile.startup/init.js
deleted file mode 100644
index ad028fd..0000000
--- a/resources/mobile.startup/init.js
+++ /dev/null
@@ -1,116 +0,0 @@
-// FIXME: make this an object with a constructor to facilitate testing
-// (see https://bugzilla.wikimedia.org/show_bug.cgi?id=44264)
-/**
- * mobileFrontend namespace
- * @class mw.mobileFrontend
- * @singleton
- */
-( function ( M, $ ) {
-       var currentPage, skin,
-               $cachedIcons = $( '#page-actions' ).find( '.icon' ),
-               PageApi = M.require( 'PageApi' ),
-               pageApi = new PageApi(),
-               Page = M.require( 'Page' ),
-               mainMenu = M.require( 'mainMenu' ),
-               Skin = M.require( 'Skin' ),
-               $pageTitle = $( 'h1#section_0' );
-
-       skin = new Skin( {
-               el: 'body',
-               tabletModules: mw.config.get( 'skin' ) === 'minerva' ? [ 
'tablet.scripts' ] : [],
-               page: getCurrentPage(),
-               mainMenu: mainMenu
-       } );
-       M.define( 'skin', skin );
-
-       $( window )
-               .on( 'resize', $.debounce( 100, $.proxy( M, 'emit', 'resize' ) 
) )
-               .on( 'scroll', $.debounce( 100, $.proxy( M, 'emit', 'scroll' ) 
) );
-
-       /**
-        * Get current page view object
-        * FIXME: Move to M.define( 'page' )
-        * @method
-        * @return {Page}
-        */
-       function getCurrentPage() {
-               if ( currentPage ) {
-                       return currentPage;
-               } else {
-                       return loadCurrentPage();
-               }
-       }
-
-       /**
-        * Constructs an incomplete Page object representing the currently 
loaded page.
-        *
-        * @method
-        * @private
-        * @ignore
-        */
-       function loadCurrentPage() {
-               var permissions = mw.config.get( 'wgRestrictionEdit', [] );
-               if ( permissions.length === 0 ) {
-                       permissions.push( '*' );
-               }
-               currentPage = new Page( {
-                       el: '#content',
-                       title: mw.config.get( 'wgPageName' ).replace( /_/g, ' ' 
),
-                       protection: {
-                               edit: permissions
-                       },
-                       isMainPage: mw.config.get( 'wgIsMainPage' ),
-                       isWatched: $( '#ca-watch' ).hasClass( 'watched' ),
-                       sections: pageApi.getSectionsFromHTML( $( '#content' ) 
),
-                       id: mw.config.get( 'wgArticleId' ),
-                       namespaceNumber: mw.config.get( 'wgNamespaceNumber' )
-               } );
-               return currentPage;
-       }
-
-       $.extend( M, {
-               getCurrentPage: getCurrentPage
-       } );
-
-       M.define( 'pageApi', pageApi );
-
-       // Recruit volunteers through the console (note console.log may not be 
a function so check via apply)
-       if ( window.console && window.console.log && window.console.log.apply &&
-                       mw.config.get( 'wgMFEnableJSConsoleRecruitment' ) ) {
-               console.log( mw.msg( 'mobile-frontend-console-recruit' ) );
-       }
-
-       // FIXME: Remove when old icon classes are no longer in page html.
-       if ( $cachedIcons.length ) {
-               // load the missing modules...
-               mw.loader.load( [ 'mediawiki.ui.icon', 
'skins.minerva.icons.images' ] );
-               $cachedIcons.addClass( 'mw-ui-icon mw-ui-icon-element' 
).removeClass( 'icon' );
-               $cachedIcons.filter( '.icon-text' ).addClass( 
'mw-ui-icon-before' ).removeClass( 'icon-text mw-ui-icon-element' );
-       }
-
-       // On a cached stable article, the immediate pre-content div looks like:
-       //
-       //   <div class="pre-content">
-       //     <h1 id="section_0"></h1>
-       //     <ul id="page-actions" class="hlist"></ul>
-       //   </div>
-       //
-       // whereas in beta it looks like:
-       //
-       //   <div class="pre-content">
-       //     <ul id="page-actions" class="hlist"></ul>
-       //     <h1 id="section_0"></h1>
-       //   </div>
-       //
-       // FIXME: Remove this once the cache has cleared. This is tracked by 
T101721.
-       if ( $pageTitle.next( '#page-actions' ).length ) {
-               $( '#page-actions' ).remove()
-                       .clone()
-                       .insertBefore( $pageTitle );
-       }
-
-       mw.loader.using( 'mobile.loggingSchemas' ).done( function () {
-               M.require( 'Schema' ).flushBeacon();
-       } );
-
-}( mw.mobileFrontend, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If37a623f1571645a040c10fc7c5304c7ee0fd332
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

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

Reply via email to