szurubooru/public_html/media/js/core.js
2013-10-09 21:31:38 +02:00

16 lines
327 B
JavaScript

if ($.when.all === undefined)
{
$.when.all = function(deferreds)
{
var deferred = new $.Deferred();
$.when.apply($, deferreds).then(function()
{
deferred.resolve(Array.prototype.slice.call(arguments, 0));
}, function()
{
deferred.fail(Array.prototype.slice.call(arguments, 0));
});
return deferred;
}
}