From 02f29a76ff76ab62d41096f1b68dc32e8055e3ac Mon Sep 17 00:00:00 2001 From: adolfintel Date: Wed, 8 Aug 2018 09:03:06 +0200 Subject: [PATCH] Fixed atrocious typo --- example-chart.html | 2 +- example-customSettings.html | 2 +- example-customSettings2.html | 2 +- example-gauges.html | 4 ++-- example-pretty.html | 2 +- example-progressBar.html | 2 +- example-telemetry-resultSharing.html | 4 ++-- example-telemetryEnabled.html | 2 +- speedtest_worker.js | 2 +- speedtest_worker.min.js | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/example-chart.html b/example-chart.html index e84c051..d7b0ce6 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 296aab5..f2efa85 100644 --- a/example-customSettings.html +++ b/example-customSettings.html @@ -132,7 +132,7 @@ function startStop(){ 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 3dbd99b..cdcc538 100644 --- a/example-customSettings2.html +++ b/example-customSettings2.html @@ -126,7 +126,7 @@ function startStop(){ 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 6498e14..088a38f 100644 --- a/example-gauges.html +++ b/example-gauges.html @@ -164,7 +164,7 @@ function startStop(){ 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 @@ function startStop(){ //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 1efd4eb..f715f43 100644 --- a/example-pretty.html +++ b/example-pretty.html @@ -126,7 +126,7 @@ function startStop(){ 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 7c2ca91..6e0f53a 100644 --- a/example-progressBar.html +++ b/example-progressBar.html @@ -144,7 +144,7 @@ function startStop(){ 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 0ceab50..7a0e743 100644 --- a/example-telemetry-resultSharing.html +++ b/example-telemetry-resultSharing.html @@ -181,7 +181,7 @@ function startStop(){ 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 @@ function startStop(){ //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 b16b98e..53eb53b 100644 --- a/example-telemetryEnabled.html +++ b/example-telemetryEnabled.html @@ -126,7 +126,7 @@ function startStop(){ 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 2f48614..c68b206 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 2fec66f..79ba9aa 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