Prtksxna has uploaded a new change for review.

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

Change subject: Use pg.fn.disablePopups to detect and stop NavigationPopups
......................................................................

Use pg.fn.disablePopups to detect and stop NavigationPopups

The global disablePopups function from NavigationPopups got scoped to
pg.fn.disabledPopups at some point. We were relying on that function
to both detect and disable the gadget.

Bug: T109912
Change-Id: I3d6de60ca2a387e45675ddb04cdc45b0f967e46a
---
M resources/ext.popups.disablenavpop.js
M resources/ext.popups.settings.js
2 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups 
refs/changes/68/233668/1

diff --git a/resources/ext.popups.disablenavpop.js 
b/resources/ext.popups.disablenavpop.js
index d7e6bb3..0ea4426 100644
--- a/resources/ext.popups.disablenavpop.js
+++ b/resources/ext.popups.disablenavpop.js
@@ -1,7 +1,7 @@
-/*global disablePopups: false*/
+/*global pg: false*/
 
 // Disable NavigationPopups
-// The `disablePopups` function exists if NavPopups is activated. If it
+// 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
@@ -12,8 +12,8 @@
 // HACK: This is a temporary fix
 ( function ( $, mw ) {
        mw.popups.disableNavPopup = function () {
-               if ( typeof disablePopups !== 'undefined' && mw.popups.enabled 
) {
-                       disablePopups();
+               if ( typeof pg.fn.disablePopups !== 'undefined' && 
mw.popups.enabled ) {
+                       pg.fn.disablePopups();
                }
        };
 } ( jQuery, mediaWiki ) );
diff --git a/resources/ext.popups.settings.js b/resources/ext.popups.settings.js
index 447faa2..5104a81 100644
--- a/resources/ext.popups.settings.js
+++ b/resources/ext.popups.settings.js
@@ -8,10 +8,10 @@
 
        /**
         * Check if the navigation popups gadget is enabled by looking for
-        * the `disablePopups` method
+        * the `pg.fn.disablePopups` method
         * @property navPopEnabled
         */
-       settings.navPopEnabled = ( typeof disablePopups !== 'undefined' );
+       settings.navPopEnabled = ( typeof pg.fn.disablePopups !== 'undefined' );
 
        /**
         * The settings' dialog's section element.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d6de60ca2a387e45675ddb04cdc45b0f967e46a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Prtksxna <[email protected]>

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

Reply via email to