Sfoglia il codice sorgente

Fix some typos and formatting

0kyn 3 anni fa
parent
commit
71e3b47130
4 ha cambiato i file con 11 aggiunte e 15 eliminazioni
  1. 1 5
      Dockerfile
  2. 5 5
      doc.md
  3. 1 1
      speedtest.js
  4. 4 4
      speedtest_worker.js

+ 1 - 5
Dockerfile

@@ -12,11 +12,9 @@ RUN apt-get update && apt-get install -y \
     && docker-php-ext-install -j$(nproc) gd pdo pdo_mysql pdo_pgsql pgsql
     && docker-php-ext-install -j$(nproc) gd pdo pdo_mysql pdo_pgsql pgsql
 
 
 # Prepare files and folders
 # Prepare files and folders
-
 RUN mkdir -p /speedtest/
 RUN mkdir -p /speedtest/
 
 
 # Copy sources
 # Copy sources
-
 COPY backend/ /speedtest/backend
 COPY backend/ /speedtest/backend
 
 
 COPY results/*.php /speedtest/results/
 COPY results/*.php /speedtest/results/
@@ -30,8 +28,7 @@ COPY docker/servers.json /servers.json
 COPY docker/*.php /speedtest/
 COPY docker/*.php /speedtest/
 COPY docker/entrypoint.sh /
 COPY docker/entrypoint.sh /
 
 
-# Prepare environment variabiles defaults
-
+# Prepare default environment variables 
 ENV TITLE=LibreSpeed
 ENV TITLE=LibreSpeed
 ENV MODE=standalone
 ENV MODE=standalone
 ENV PASSWORD=password
 ENV PASSWORD=password
@@ -41,6 +38,5 @@ ENV REDACT_IP_ADDRESSES=false
 ENV WEBPORT=80
 ENV WEBPORT=80
 
 
 # Final touches
 # Final touches
-
 EXPOSE 80
 EXPOSE 80
 CMD ["bash", "/entrypoint.sh"]
 CMD ["bash", "/entrypoint.sh"]

+ 5 - 5
doc.md

@@ -117,7 +117,7 @@ If you're not using telemetry and results sharing, you can delete the `results`
 Details about the examples and how to make custom UIs will be discussed later. If you don't want to make a custom UI, feel free to modify the example and replace "LibreSpeed Example" with the name of your test.
 Details about the examples and how to make custom UIs will be discussed later. If you don't want to make a custom UI, feel free to modify the example and replace "LibreSpeed Example" with the name of your test.
 
 
 #### Privacy
 #### Privacy
-Telemetry contains personal information (according to GDPR defintion), therefore it is important to treat this data respectfully of national and international laws, especially if you plan to offer the service in the European Union.
+Telemetry contains personal information (according to GDPR definition), therefore it is important to treat this data respectfully of national and international laws, especially if you plan to offer the service in the European Union.
 
 
 `example-singleServer-full.html` and `example-multipleServers-full.html` both contain a privacy policy for the service: you MUST read it, change it if necessary, and add your email address for data deletion requests. __Failure to comply with GDPR regulations can get you in serious trouble.__
 `example-singleServer-full.html` and `example-multipleServers-full.html` both contain a privacy policy for the service: you MUST read it, change it if necessary, and add your email address for data deletion requests. __Failure to comply with GDPR regulations can get you in serious trouble.__
 
 
@@ -506,7 +506,7 @@ You can think of this as a finite state machine. These are the states (use getSt
     ```
     ```
     While in state 1, you can only add test points, you cannot change the test settings. When you're done, use selectServer(callback) to select the test point with the lowest ping. This is asynchronous, when it's done, it will call your callback function and move to state 2. Calling setSelectedServer(server) will manually select a server and move to state 2.
     While in state 1, you can only add test points, you cannot change the test settings. When you're done, use selectServer(callback) to select the test point with the lowest ping. This is asynchronous, when it's done, it will call your callback function and move to state 2. Calling setSelectedServer(server) will manually select a server and move to state 2.
 * __2__: test point selected, ready to start the test. Use `start()` to begin, this will move to state 3
 * __2__: test point selected, ready to start the test. Use `start()` to begin, this will move to state 3
-* __3__: test running. Here, your `onupdate` event calback will be called periodically, with data coming from the worker about speed and progress. A data object will be passed to your `onupdate` function, with the following items:
+* __3__: test running. Here, your `onupdate` event callback will be called periodically, with data coming from the worker about speed and progress. A data object will be passed to your `onupdate` function, with the following items:
         - `dlStatus`: download speed in mbps
         - `dlStatus`: download speed in mbps
         - `ulStatus`: upload speed in mbps
         - `ulStatus`: upload speed in mbps
         - `pingStatus`: ping in ms
         - `pingStatus`: ping in ms
@@ -664,7 +664,7 @@ Access-Control-Allow-Headers: Content-Encoding, Content-Type
 This file stores telemetry information into the database.
 This file stores telemetry information into the database.
 
 
 Data is passed as POST parameters:
 Data is passed as POST parameters:
-* `ispinfo`: ISP info (if enabled, empty strng otherwise)
+* `ispinfo`: ISP info (if enabled, empty string otherwise)
 * `extra`: the `telemetry_extra` string passed to the worker (if set, empty string otherwise)
 * `extra`: the `telemetry_extra` string passed to the worker (if set, empty string otherwise)
 * `dl`: download speed
 * `dl`: download speed
 * `ul`: upload speed
 * `ul`: upload speed
@@ -741,7 +741,7 @@ s.setParameter("url_ping","backend/empty.dat");
 s.setParameter("test_order","P_D_U");
 s.setParameter("test_order","P_D_U");
 ```
 ```
 
 
-This will point to our static files and set the test to only do ping/jitter, download and uplod tests.
+This will point to our static files and set the test to only do ping/jitter, download and upload tests.
 
 
 ## Troubleshooting
 ## Troubleshooting
 These are the most common issues reported by users, and how to fix them. If you still need help, contact me at [info@fdossena.com](mailto:info@fdossena.com).
 These are the most common issues reported by users, and how to fix them. If you still need help, contact me at [info@fdossena.com](mailto:info@fdossena.com).
@@ -807,7 +807,7 @@ Also, make sure that the web server has write permission on the `results` folder
 
 
 ## Known bugs and limitations
 ## Known bugs and limitations
 ### General
 ### General
-* The ping/jitter test is measured by seeing how long it takes for an empty XHR to complete. It is not an acutal ICMP ping. Different browsers may also show different results, especially on very fast connections on slow devices.
+* The ping/jitter test is measured by seeing how long it takes for an empty XHR to complete. It is not an actual ICMP ping. Different browsers may also show different results, especially on very fast connections on slow devices.
 ### IE specific
 ### IE specific
 * The upload test is not precise on very fast connections with high latency (will probably be fixed by Edge 17)
 * The upload test is not precise on very fast connections with high latency (will probably be fixed by Edge 17)
 * On IE11, a same origin policy error is erroneously triggered under unknown conditions. Seems to be related to running the test from unusual URLs like a top level domain (for instance http://abc/speedtest). These are bugs in IE11's implementation of the same origin policy, not in the speedtest itself.
 * On IE11, a same origin policy error is erroneously triggered under unknown conditions. Seems to be related to running the test from unusual URLs like a top level domain (for instance http://abc/speedtest). These are bugs in IE11's implementation of the same origin policy, not in the speedtest itself.

+ 1 - 1
speedtest.js

@@ -27,7 +27,7 @@
         }
         }
         While in state 1, you can only add test points, you cannot change the test settings. When you're done, use selectServer(callback) to select the test point with the lowest ping. This is asynchronous, when it's done, it will call your callback function and move to state 2. Calling setSelectedServer(server) will manually select a server and move to state 2.
         While in state 1, you can only add test points, you cannot change the test settings. When you're done, use selectServer(callback) to select the test point with the lowest ping. This is asynchronous, when it's done, it will call your callback function and move to state 2. Calling setSelectedServer(server) will manually select a server and move to state 2.
     - 2: test point selected, ready to start the test. Use start() to begin, this will move to state 3
     - 2: test point selected, ready to start the test. Use start() to begin, this will move to state 3
-    - 3: test running. Here, your onupdate event calback will be called periodically, with data coming from the worker about speed and progress. A data object will be passed to your onupdate function, with the following items:
+    - 3: test running. Here, your onupdate event callback will be called periodically, with data coming from the worker about speed and progress. A data object will be passed to your onupdate function, with the following items:
             - dlStatus: download speed in mbps
             - dlStatus: download speed in mbps
             - ulStatus: upload speed in mbps
             - ulStatus: upload speed in mbps
             - pingStatus: ping in ms
             - pingStatus: ping in ms

+ 4 - 4
speedtest_worker.js

@@ -60,12 +60,12 @@ var settings = {
 	garbagePhp_chunkSize: 100, // size of chunks sent by garbage.php (can be different if enable_quirks is active)
 	garbagePhp_chunkSize: 100, // size of chunks sent by garbage.php (can be different if enable_quirks is active)
 	enable_quirks: true, // enable quirks for specific browsers. currently it overrides settings to optimize for specific browsers, unless they are already being overridden with the start command
 	enable_quirks: true, // enable quirks for specific browsers. currently it overrides settings to optimize for specific browsers, unless they are already being overridden with the start command
 	ping_allowPerformanceApi: true, // if enabled, the ping test will attempt to calculate the ping more precisely using the Performance API. Currently works perfectly in Chrome, badly in Edge, and not at all in Firefox. If Performance API is not supported or the result is obviously wrong, a fallback is provided.
 	ping_allowPerformanceApi: true, // if enabled, the ping test will attempt to calculate the ping more precisely using the Performance API. Currently works perfectly in Chrome, badly in Edge, and not at all in Firefox. If Performance API is not supported or the result is obviously wrong, a fallback is provided.
-	overheadCompensationFactor: 1.06, //can be changed to compensatie for transport overhead. (see doc.md for some other values)
+	overheadCompensationFactor: 1.06, //can be changed to compensate for transport overhead. (see doc.md for some other values)
 	useMebibits: false, //if set to true, speed will be reported in mebibits/s instead of megabits/s
 	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)
 	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
 	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
+    forceIE11Workaround: false //when set to true, it will force the IE11 upload test on all browsers. Debug only
 };
 };
 
 
 var xhr = null; // array of currently active xhr requests
 var xhr = null; // array of currently active xhr requests
@@ -423,7 +423,7 @@ function dlTest(done) {
 		200
 		200
 	);
 	);
 }
 }
-// upload test, calls done function whent it's over
+// upload test, calls done function when it's over
 var ulCalled = false; // used to prevent multiple accidental calls to ulTest
 var ulCalled = false; // used to prevent multiple accidental calls to ulTest
 function ulTest(done) {
 function ulTest(done) {
 	tverb("ulTest");
 	tverb("ulTest");
@@ -474,7 +474,7 @@ function ulTest(done) {
 						}
 						}
 					}
 					}
 					if (ie11workaround) {
 					if (ie11workaround) {
-						// IE11 workarond: xhr.upload does not work properly, therefore we send a bunch of small 256k requests and use the onload event as progress. This is not precise, especially on fast connections
+						// IE11 workaround: xhr.upload does not work properly, therefore we send a bunch of small 256k requests and use the onload event as progress. This is not precise, especially on fast connections
 						xhr[i].onload = xhr[i].onerror = function() {
 						xhr[i].onload = xhr[i].onerror = function() {
 							tverb("ul stream progress event (ie11wa)");
 							tverb("ul stream progress event (ie11wa)");
 							totLoaded += reqsmall.size;
 							totLoaded += reqsmall.size;