Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/376469 )

Change subject: Replace deprecated jQuery functions
......................................................................

Replace deprecated jQuery functions

* Replace .unbind(...) by .off(...)
* Replace $(document).ready(...) by $(...)

Change-Id: Id57cf011f926727a360f6ced3d3ce7db161bffcd
---
M modules/ext.inlinediff.js
1 file changed, 6 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RecentActivityFeed 
refs/changes/69/376469/1

diff --git a/modules/ext.inlinediff.js b/modules/ext.inlinediff.js
index 7c2a95c..d2db347 100644
--- a/modules/ext.inlinediff.js
+++ b/modules/ext.inlinediff.js
@@ -105,7 +105,7 @@
                    }
                    newTable.id = button.id + "display";
 
-                   $(button).unbind("click");
+                   $(button).off("click");
                    if (typeof inlineDiffBigUI === "undefined") {
                        $(button).html('<b><span style="color:black;"> 
[</span><span style="color:#339900;">' + hideText + '</span><span 
style="color:black;">] </span></b>');
                        $(button).click(function() {
@@ -128,7 +128,7 @@
     function showEditInspection(button) {
        $("#" + button.id + "display").css("display", "");
        $(button).attr("value", "Hide edit");
-       $(button).unbind("click");
+       $(button).off("click");
        $(button).click(function() {
                return hideEditInspection(this);
            });
@@ -138,7 +138,7 @@
     function hideEditInspection(button) {
        $("#" + button.id + "display").css("display", "none");
        $(button).attr("value", "Show edit");
-       $(button).unbind("click");
+       $(button).off("click");
        $(button).click(function() {
                return showEditInspection(this);
            });
@@ -148,7 +148,7 @@
     function showSmallEditInspection(button) {
        $("#" + button.id + "display").css("display", "");
        $(button).html('<b><span style="color:black;"> [</span><span 
style="color:#339900;">' + hideText + '</span><span style="color:black;">] 
</span></b>');
-       $(button).unbind("click");
+       $(button).off("click");
        $(button).click(function() {
                return hideSmallEditInspection(this);
            });
@@ -158,13 +158,12 @@
     function hideSmallEditInspection(button) {
        $("#" + button.id + "display").css("display", "none");
        $(button).html('<b><span style="color:black;"> [</span><span 
style="color:#339900;">' + showText + '</span><span style="color:black;">] 
</span></b>');
-       $(button).unbind("click");
+       $(button).off("click");
        $(button).click(function() {
                return showSmallEditInspection(this);
            });
        return false;
     }
 
-    $(document).ready(addWatchlistInspectionBoxes);
-    //  $(document).ready(alert);
+    $(addWatchlistInspectionBoxes);
 })(window.jQuery);
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id57cf011f926727a360f6ced3d3ce7db161bffcd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RecentActivityFeed
Gerrit-Branch: master
Gerrit-Owner: Fomafix <foma...@googlemail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to