szurubooru/public_html/media/js/core.js
2013-10-09 00:58:49 +02:00

18 lines
381 B
JavaScript

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