From 96e2c9b6995fd077148113346d88fce06bb910e6 Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Wed, 7 Sep 2022 18:49:06 +0300 Subject: [PATCH 1/2] Update AJAXRequest.js --- AJAXRequest.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AJAXRequest.js b/AJAXRequest.js index eae0cc9..4278aea 100644 --- a/AJAXRequest.js +++ b/AJAXRequest.js @@ -327,7 +327,7 @@ function AJAXRequest(config = { this.retry.id = setInterval(function () { i.retry.passed++; - i.retry.func(i.retry.wait - i.retry.passed); + i.retry.func(i.retry.wait - i.retry.passed, i.retry.pass_number); if (i.retry.passed === i.retry.wait) { clearInterval(i.retry.id); i.retry.passed = 0; From 9b904012f0289e1f4447c740ddda5cf31ccf8663 Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Sun, 22 Jan 2023 16:55:27 +0300 Subject: [PATCH 2/2] Update AJAXRequest.js closes #37 --- AJAXRequest.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/AJAXRequest.js b/AJAXRequest.js index a3d7073..aab5f55 100644 --- a/AJAXRequest.js +++ b/AJAXRequest.js @@ -93,11 +93,11 @@ Object.defineProperties(AJAXRequest, { Object.defineProperties(AJAXRequest.META, { VERSION: { - value: '2.1.2', + value: '2.1.3', writable: false }, REALSE_DATE: { - value: '2022-09-14', + value: '2023-01-22', writable: false }, CONTRIBUTORS: { @@ -1671,6 +1671,18 @@ function AJAXRequest(config = { }, writable:false, enumerable: true + }, + hasActiveRequest:{ + value:function () { + for (var x = 0 ; x < this.xhr_pool.length ; x++) { + if (this.xhr_pool[x].active) { + return true; + } + } + return false; + }, + writable:false, + enumerable: true } });