mirror of
https://github.com/librespeed/speedtest.git
synced 2024-05-10 18:54:52 +00:00
Improved settings behavior
This commit is contained in:
+2
-2
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user