resources: Drop jquery.async, deprecated since 1.33
authorJames D. Forrester <jforrester@wikimedia.org>
Sat, 27 Apr 2019 05:02:39 +0000 (00:02 -0500)
committerKrinkle <krinklemail@gmail.com>
Mon, 13 May 2019 18:24:25 +0000 (18:24 +0000)
Bug: T209699
Change-Id: Ia1a034de8d9996d9955744b7b2b453f4845d69d8

RELEASE-NOTES-1.34
resources/Resources.php
resources/lib/foreign-resources.yaml
resources/lib/jquery.async.js [deleted file]

index 247f48e..e3c1ac3 100644 (file)
@@ -57,6 +57,7 @@ For notes on 1.33.x and older releases, see HISTORY.
 * …
 
 ==== Removed external libraries ====
 * …
 
 ==== Removed external libraries ====
+* The jquery.async module, deprecated in 1.33, was removed.
 * …
 
 === Bug fixes in 1.34 ===
 * …
 
 === Bug fixes in 1.34 ===
index c28ac4a..6b0b233 100644 (file)
@@ -169,10 +169,6 @@ return [
                'messages' => [ 'brackets', 'word-separator' ],
                'targets' => [ 'mobile', 'desktop' ],
        ],
                'messages' => [ 'brackets', 'word-separator' ],
                'targets' => [ 'mobile', 'desktop' ],
        ],
-       'jquery.async' => [
-               'scripts' => 'resources/lib/jquery.async.js',
-               'deprecated' => true,
-       ],
        'jquery.byteLength' => [
                'scripts' => 'resources/src/jquery/jquery.byteLength.js',
                'deprecated' => 'Use "mediawiki.String" instead.',
        'jquery.byteLength' => [
                'scripts' => 'resources/src/jquery/jquery.byteLength.js',
                'deprecated' => 'Use "mediawiki.String" instead.',
index 3adca1b..4609c04 100644 (file)
@@ -121,8 +121,6 @@ jquery:
   integrity: sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=
   dest: jquery.js
 
   integrity: sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60=
   dest: jquery.js
 
-# TODO: jquery.async.js
-
 # TODO: jquery.chosen
 
 jquery.client:
 # TODO: jquery.chosen
 
 jquery.client:
diff --git a/resources/lib/jquery.async.js b/resources/lib/jquery.async.js
deleted file mode 100644 (file)
index 2161f6b..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * jQuery Asynchronous Plugin 1.0
- *
- * Copyright (c) 2008 Vincent Robert (genezys.net)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- */
-(function($){
-
-// opts.delay : (default 10) delay between async call in ms
-// opts.bulk : (default 500) delay during which the loop can continue synchronously without yielding the CPU
-// opts.test : (default true) function to test in the while test part
-// opts.loop : (default empty) function to call in the while loop part
-// opts.end : (default empty) function to call at the end of the while loop
-$.whileAsync = function(opts) {
-       var delay = Math.abs(opts.delay) || 10,
-               bulk = isNaN(opts.bulk) ? 500 : Math.abs(opts.bulk),
-               test = opts.test || function(){ return true; },
-               loop = opts.loop || function(){},
-               end = opts.end || function(){};
-       
-       (function(){
-
-               var t = false,
-                       begin = new Date();
-                       
-               while( t = test() ) {
-                       loop();
-                       if( bulk === 0 || (new Date() - begin) > bulk ) {
-                               break;
-                       }
-               }
-               if( t ) {
-                       setTimeout(arguments.callee, delay);
-               }
-               else {
-                       end();
-               }
-               
-       })();
-};
-
-// opts.delay : (default 10) delay between async call in ms
-// opts.bulk : (default 500) delay during which the loop can continue synchronously without yielding the CPU
-// opts.loop : (default empty) function to call in the each loop part, signature: function(index, value) this = value
-// opts.end : (default empty) function to call at the end of the each loop
-$.eachAsync = function(array, opts) {
-       var     i = 0,
-               l = array.length,
-               loop = opts.loop || function(){};
-       
-       $.whileAsync(
-               $.extend(opts, {
-                       test: function() { return i < l; },
-                       loop: function() {
-                               var val = array[i];
-                               return loop.call(val, i++, val);
-                       }
-               })
-       );
-};
-
-$.fn.eachAsync = function(opts) {
-       $.eachAsync(this, opts);
-       return this;
-}
-
-})(jQuery);
\ No newline at end of file