Browse Source

Improved settings behavior

dosse91 5 năm trước cách đây
mục cha
commit
a8af6ba700
2 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 2 2
      speedtest.js
  2. 2 1
      speedtest_worker.js

+ 2 - 2
speedtest.js

@@ -69,8 +69,8 @@ Speedtest.prototype = {
    * Invalid values or nonexistant parameters will be ignored by the speedtest worker.
    */
   setParameter: function(parameter, value) {
-    if (this._state != 0 && this._state != 4)
-      throw "You cannot change the test settings after adding server or starting the test";
+    if (this._state == 3)
+      throw "You cannot change the test settings while running the test";
     this._settings[parameter] = value;
     if(parameter === "telemetry_extra"){
         this._originalExtra=this._settings.telemetry_extra;

+ 2 - 1
speedtest_worker.js

@@ -64,7 +64,8 @@ var settings = {
 	useMebibits: false, //if set to true, speed will be reported in mebibits/s instead of megabits/s
 	telemetry_level: 0, // 0=disabled, 1=basic (results only), 2=full (results and timing) 3=debug (results+log)
 	url_telemetry: "results/telemetry.php", // path to the script that adds telemetry data to the database
-	telemetry_extra: "" //extra data that can be passed to the telemetry through the settings
+	telemetry_extra: "", //extra data that can be passed to the telemetry through the settings
+    forceIE11Workaround: false //when set to true, it will foce the IE11 upload test on all browsers. Debug only
 };
 
 var xhr = null; // array of currently active xhr requests