2014-06-17 11:08:05 +00:00
|
|
|
/*global disablePopups: false*/
|
2014-03-22 04:38:01 +00:00
|
|
|
|
|
|
|
// Disable NavigationPopups
|
2014-06-17 11:08:05 +00:00
|
|
|
// The `disablePopups` function exists if NavPopups is activated. If it
|
|
|
|
// exists, its called, otherwise, we do nothing.
|
|
|
|
|
2015-01-06 10:15:24 +00:00
|
|
|
// 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
|
|
|
|
|
2014-03-22 04:38:01 +00:00
|
|
|
// This should be happening in NavPopups itself or by disabling the gadget
|
2014-06-24 10:04:35 +00:00
|
|
|
// HACK: This is a temporary fix
|
2014-06-17 11:08:05 +00:00
|
|
|
( function ( $, mw ) {
|
2015-01-06 10:15:24 +00:00
|
|
|
mw.popups.disableNavPopup = function () {
|
2014-06-17 11:08:05 +00:00
|
|
|
if ( typeof disablePopups !== 'undefined' && mw.popups.enabled ) {
|
2014-03-22 04:38:01 +00:00
|
|
|
disablePopups();
|
|
|
|
}
|
2015-01-06 10:15:24 +00:00
|
|
|
};
|
2014-06-17 11:08:05 +00:00
|
|
|
} ( jQuery, mediaWiki ) );
|