diff --git a/example-chart.html b/example-chart.html
index e84c051f7..d7b0ce6ce 100644
--- a/example-chart.html
+++ b/example-chart.html
@@ -201,7 +201,7 @@
var interval = setInterval(function () { w.postMessage('status') }, 100)
w.onmessage = function (event) {
var data = JSON.parse(event.data)
- var status = data.testStatus
+ var status = data.testState
if (status >= 4) {
clearInterval(interval)
document.getElementById('abortBtn').style.display = 'none'
diff --git a/example-customSettings.html b/example-customSettings.html
index 296aab517..f2efa8568 100644
--- a/example-customSettings.html
+++ b/example-customSettings.html
@@ -132,7 +132,7 @@
I("startStopBtn").className="running";
w.onmessage=function(e){
var data=JSON.parse(e.data);
- var status=data.testStatus;
+ var status=data.testState;
if(status>=4){
//test completed
I("startStopBtn").className="";
diff --git a/example-customSettings2.html b/example-customSettings2.html
index 3dbd99b54..cdcc5385f 100644
--- a/example-customSettings2.html
+++ b/example-customSettings2.html
@@ -126,7 +126,7 @@
I("startStopBtn").className="running";
w.onmessage=function(e){
var data=JSON.parse(e.data);
- var status=data.testStatus;
+ var status=data.testState;
if(status>=4){
//test completed
I("startStopBtn").className="";
diff --git a/example-gauges.html b/example-gauges.html
index 6498e1469..088a38f59 100644
--- a/example-gauges.html
+++ b/example-gauges.html
@@ -164,7 +164,7 @@
I("startStopBtn").className="running";
w.onmessage=function(e){
data=JSON.parse(e.data);
- var status=data.testStatus;
+ var status=data.testState;
if(status>=4){
//test completed
I("startStopBtn").className="";
@@ -177,7 +177,7 @@
//this function reads the data sent back by the worker and updates the UI
function updateUI(forced){
if(!forced&&(!data||!w)) return;
- var status=data.testStatus;
+ var status=data.testState;
I("ip").textContent=data.clientIp;
I("dlText").textContent=(status==1&&data.dlStatus==0)?"...":data.dlStatus;
drawMeter(I("dlMeter"),mbpsToAmount(Number(data.dlStatus*(status==1?oscillate():1))),meterBk,dlColor,Number(data.dlProgress),progColor);
diff --git a/example-pretty.html b/example-pretty.html
index 1efd4ebd5..f715f4342 100644
--- a/example-pretty.html
+++ b/example-pretty.html
@@ -126,7 +126,7 @@
I("startStopBtn").className="running";
w.onmessage=function(e){
var data=JSON.parse(e.data);
- var status=data.testStatus;
+ var status=data.testState;
if(status>=4){
//test completed
I("startStopBtn").className="";
diff --git a/example-progressBar.html b/example-progressBar.html
index 7c2ca9166..6e0f53a6f 100644
--- a/example-progressBar.html
+++ b/example-progressBar.html
@@ -144,7 +144,7 @@
I("startStopBtn").className="running";
w.onmessage=function(e){
var data=JSON.parse(e.data);
- var status=data.testStatus;
+ var status=data.testState;
if(status>=4){
//test completed
I("startStopBtn").className="";
diff --git a/example-telemetry-resultSharing.html b/example-telemetry-resultSharing.html
index 0ceab5040..7a0e743dd 100644
--- a/example-telemetry-resultSharing.html
+++ b/example-telemetry-resultSharing.html
@@ -181,7 +181,7 @@
I("shareArea").style.display="none";
w.onmessage=function(e){
data=JSON.parse(e.data);
- var status=data.testStatus;
+ var status=data.testState;
if(status>=4){
//test completed
I("startStopBtn").className="";
@@ -207,7 +207,7 @@
//this function reads the data sent back by the worker and updates the UI
function updateUI(forced){
if(!forced&&(!data||!w)) return;
- var status=data.testStatus;
+ var status=data.testState;
I("ip").textContent=data.clientIp;
I("dlText").textContent=(status==1&&data.dlStatus==0)?"...":data.dlStatus;
drawMeter(I("dlMeter"),mbpsToAmount(Number(data.dlStatus*(status==1?oscillate():1))),meterBk,dlColor,Number(data.dlProgress),progColor);
diff --git a/example-telemetryEnabled.html b/example-telemetryEnabled.html
index b16b98e2b..53eb53be6 100644
--- a/example-telemetryEnabled.html
+++ b/example-telemetryEnabled.html
@@ -126,7 +126,7 @@
I("startStopBtn").className="running";
w.onmessage=function(e){
var data=JSON.parse(e.data);
- var status=data.testStatus
+ var status=data.testState
if(status>=4){
//test completed
I("startStopBtn").className="";
diff --git a/speedtest_worker.js b/speedtest_worker.js
index 2f48614e0..c68b2060b 100644
--- a/speedtest_worker.js
+++ b/speedtest_worker.js
@@ -72,7 +72,7 @@ this.addEventListener('message', function (e) {
var params = e.data.split(' ')
if (params[0] === 'status') { // return status
postMessage(JSON.stringify({
- testStatus:testStatus,
+ testState:testStatus,
dlStatus:dlStatus,
ulStatus:ulStatus,
pingStatus:pingStatus,
diff --git a/speedtest_worker.min.js b/speedtest_worker.min.js
index 2fec66f08..79ba9aa60 100644
--- a/speedtest_worker.min.js
+++ b/speedtest_worker.min.js
@@ -1 +1 @@
-var testStatus=-1,dlStatus="",ulStatus="",pingStatus="",jitterStatus="",clientIp="",dlProgress=0,ulProgress=0,pingProgress=0,testId="noID",log="";function tlog(s){log+=Date.now()+": "+s+"\n"}function twarn(s){log+=Date.now()+" WARN: "+s+"\n",console.warn(s)}var settings={test_order:"IP_D_U",time_ul:15,time_dl:15,time_ulGraceTime:3,time_dlGraceTime:1.5,count_ping:35,url_dl:"garbage.php",url_ul:"empty.php",url_ping:"empty.php",url_getIp:"getIP.php",getIp_ispInfo:!0,getIp_ispInfo_distance:"km",xhr_dlMultistream:10,xhr_ulMultistream:3,xhr_multistreamDelay:300,xhr_ignoreErrors:1,xhr_dlUseBlob:!1,xhr_ul_blob_megabytes:20,garbagePhp_chunkSize:20,enable_quirks:!0,ping_allowPerformanceApi:!0,overheadCompensationFactor:1.06,useMebibits:!1,telemetry_level:0,url_telemetry:"telemetry/telemetry.php",telemetry_extra:""},xhr=null,interval=null,test_pointer=0;function url_sep(url){return url.match(/\?/)?"&":"?"}function clearRequests(){if(tlog("stopping pending XHRs"),xhr){for(var i=0;i=settings.test_order.length)0settings.time_dl&&01e3*settings.time_dlGraceTime&&(0settings.time_ul&&01e3*settings.time_ulGraceTime&&(0=settings.test_order.length)0settings.time_dl&&01e3*settings.time_dlGraceTime&&(0settings.time_ul&&01e3*settings.time_ulGraceTime&&(0