From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- resources/jquery/jquery.async.js | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'resources/jquery/jquery.async.js') diff --git a/resources/jquery/jquery.async.js b/resources/jquery/jquery.async.js index 61493f71..2161f6b9 100644 --- a/resources/jquery/jquery.async.js +++ b/resources/jquery/jquery.async.js @@ -13,33 +13,28 @@ // 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) -{ +$.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(){}; + end = opts.end || function(){}; (function(){ var t = false, begin = new Date(); - while( t = test() ) - { + while( t = test() ) { loop(); - if( bulk === 0 || (new Date() - begin) > bulk ) - { + if( bulk === 0 || (new Date() - begin) > bulk ) { break; } } - if( t ) - { + if( t ) { setTimeout(arguments.callee, delay); } - else - { + else { end(); } @@ -50,17 +45,15 @@ $.whileAsync = function(opts) // 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, +$.eachAsync = function(array, opts) { + var i = 0, l = array.length, loop = opts.loop || function(){}; $.whileAsync( $.extend(opts, { - test: function(){ return i < l; }, - loop: function() - { + test: function() { return i < l; }, + loop: function() { var val = array[i]; return loop.call(val, i++, val); } @@ -68,11 +61,9 @@ $.eachAsync = function(array, opts) ); }; -$.fn.eachAsync = function(opts) -{ +$.fn.eachAsync = function(opts) { $.eachAsync(this, opts); return this; } -})(jQuery); - +})(jQuery); \ No newline at end of file -- cgit v1.2.3-54-g00ecf