mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-28 09:20:31 +00:00
6eef4f325b
Adds the jscs and jshint packages for development and their tasks in Grunt. Also fixes all the code convention errors. Change-Id: If1c9dfdbe22d4912d78b6a51b1292866970a85cc
23 lines
721 B
JavaScript
23 lines
721 B
JavaScript
/*global pg: false*/
|
|
|
|
// Disable NavigationPopups
|
|
// The `pg.fn.disablePopups` function exists if NavPopups is activated. If it
|
|
// exists, its called, otherwise, we do nothing.
|
|
|
|
// Since NavPopups is initialized several times, its best to disable it
|
|
// right when we are about to render the popup, from mw.popups.render.render.
|
|
// See https://phabricator.wikimedia.org/T64952#800921
|
|
|
|
// This should be happening in NavPopups itself or by disabling the gadget
|
|
// HACK: This is a temporary fix
|
|
( function ( $, mw ) {
|
|
mw.popups.disableNavPopup = function () {
|
|
if ( typeof pg !== 'undefined' &&
|
|
pg.fn.disablePopups !== undefined &&
|
|
mw.popups.enabled
|
|
) {
|
|
pg.fn.disablePopups();
|
|
}
|
|
};
|
|
}( jQuery, mediaWiki ) );
|