mediawiki-extensions-Popups/resources/ext.popups.disablenavpop.js
Prateek Saxena 8f4e12d4b1 disablenavpop: Use winow onload instead of dom ready
This code has not been working because processAllPopups does
not execute. Test the change with:
https://en.wikipedia.org/wiki/User:Prtksxna/common.js

Bug: 62952
Change-Id: I3c8b5590b89693743c85c006fc0ee0a50e8b8342
2014-08-20 19:36:23 +05:30

17 lines
543 B
JavaScript

/*global disablePopups: false*/
// Disable NavigationPopups
// The `disablePopups` function exists if NavPopups is activated. If it
// exists, its called, otherwise, we do nothing.
// This should be happening in NavPopups itself or by disabling the gadget
// HACK: This is a temporary fix
( function ( $, mw ) {
// NavPopups sets everything up on window load and not on DOM ready.
$( window ).load( function () {
if ( typeof disablePopups !== 'undefined' && mw.popups.enabled ) {
disablePopups();
}
} );
} ( jQuery, mediaWiki ) );