jenkins-bot has submitted this change and it was merged. 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, 10 insertions(+), 10 deletions(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/ext.cite.popups.js b/modules/ext.cite.popups.js index 03529fd..eb1e507 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( { - bodyHandler: function() { - return $( '#' + this.hash.substr(1) + ' > .reference-text' ) - .html(); - }, - showURL : false - } ); + mw.hook( 'wikipage.content' ).add( function ( $content ) { + $content.find( '.biblio-cite-link,sup.reference a' ).tooltip( { + bodyHandler: function () { + 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: merged Gerrit-Change-Id: I4d755ab57de3754b361174b33e53462f16e490da Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/Cite Gerrit-Branch: master Gerrit-Owner: Hoo man <[email protected]> Gerrit-Reviewer: Hoo man <[email protected]> Gerrit-Reviewer: Krinkle <[email protected]> Gerrit-Reviewer: Matmarex <[email protected]> Gerrit-Reviewer: TheDJ <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
