Krinkle has uploaded a new change for review.

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


Change subject: Move firing of "wikipage.content" mw.hook out of mediawiki.util
......................................................................

Move firing of "wikipage.content" mw.hook out of mediawiki.util

* Update "wikipage.content" arguments to really pass the
  content and not the entire body wrapper (no longer
  mw.util.$content).

* Move the firing of "wikipage.content" from mediawiki.util to
  mediawiiki.page.startup. It didnt really belong in
  mediawiki.util, and now that we're no longer passing it
  mw.util.$content they're no longer related in either direction.

Bug: 30713
Change-Id: I56d6491527547f898e239b531c98e903863f8999
---
M resources/mediawiki.page/mediawiki.page.startup.js
M resources/mediawiki/mediawiki.util.js
2 files changed, 7 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/12/74312/1

diff --git a/resources/mediawiki.page/mediawiki.page.startup.js 
b/resources/mediawiki.page/mediawiki.page.startup.js
index 029039d..f0b38c6 100644
--- a/resources/mediawiki.page/mediawiki.page.startup.js
+++ b/resources/mediawiki.page/mediawiki.page.startup.js
@@ -8,11 +8,12 @@
                .addClass( 'client-js' )
                .removeClass( 'client-nojs' );
 
-       // Initialize utilities as soon as the document is ready 
(mw.util.$content,
-       // messageBoxNew, profile, tooltip access keys, Table of contents 
toggle, ..).
-       // Enqueued into domready from here instead of mediawiki.page.ready to 
ensure that it gets enqueued
-       // before other modules hook into document ready, so that 
mw.util.$content (defined by mw.util.init),
-       // is defined for them.
-       $( document ).ready( mw.util.init );
+       $( document ).ready( function () {
+               // Initialize utilities as soon as the document is ready 
(mw.util.$content,
+               // messageBoxNew, profile, tooltip access keys, Table of 
contents toggle, ..).
+               mw.util.init();
+
+               mw.hook( 'wikipage.content' ).fire( $( '#mw-content-text' ) );
+       } );
 
 }( mediaWiki, jQuery ) );
diff --git a/resources/mediawiki/mediawiki.util.js 
b/resources/mediawiki/mediawiki.util.js
index 977929d..b482823 100644
--- a/resources/mediawiki/mediawiki.util.js
+++ b/resources/mediawiki/mediawiki.util.js
@@ -104,8 +104,6 @@
                                return util.$content;
                        } )();
 
-                       mw.hook( 'wikipage.content' ).fire( util.$content );
-
                        // Table of contents toggle
                        $tocTitle = $( '#toctitle' );
                        $tocToggleLink = $( '#togglelink' );

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

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

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

Reply via email to