Hoo man has uploaded a new change for review.

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


Change subject: Use mw.hook( 'wikipage.content' ) for citation popup JS
......................................................................

Use mw.hook( 'wikipage.content' ) for citation popup JS

Factored out of https://gerrit.wikimedia.org/r/79472

Change-Id: I4d755ab57de3754b361174b33e53462f16e490da
---
M modules/ext.cite.popups.js
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cite 
refs/changes/48/81548/1

diff --git a/modules/ext.cite.popups.js b/modules/ext.cite.popups.js
index 03529fd..d2f2274 100644
--- a/modules/ext.cite.popups.js
+++ b/modules/ext.cite.popups.js
@@ -1,13 +1,13 @@
-( function( $ ) {
+( function( mw, $ ) {
        'use strict';
 
-       $( function() {
-               $( '.biblio-cite-link,sup.reference a' ).tooltip( {
+       mw.hook( 'wikipage.content' ).add( function( $content ) {
+               $content.find( '.biblio-cite-link,sup.reference a' ).tooltip( {
                                bodyHandler: function() {
-                                       return $( '#' + this.hash.substr(1) + ' 
> .reference-text' )
+                                       return $content.find( '#' + 
this.hash.substr(1) + ' > .reference-text' )
                                                .html();
                                },
                                showURL : false
                        } );
        } );
-} )( jQuery );
+} )( mediaWiki, jQuery );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d755ab57de3754b361174b33e53462f16e490da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>

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

Reply via email to