From 60a314faf6499e707b44c12dcdb75d747326e3d2 Mon Sep 17 00:00:00 2001 From: anoy Date: Tue, 9 May 2017 23:11:33 +0200 Subject: [PATCH 1/4] unify and beautify code add editorconfig --- .editorconfig | 18 ++ example1.html | 52 ++-- example2.html | 163 +++++----- example3.html | 239 ++++++++------- example4.html | 363 +++++++++++----------- example5.html | 490 +++++++++++++++--------------- speedtest_worker.js | 645 ++++++++++++++++++++-------------------- speedtest_worker.min.js | Bin 7393 -> 14758 bytes 8 files changed, 1016 insertions(+), 954 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..8f4f1398b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +# EditorConfig is awesome: http://EditorConfig.org + +root = true + +[*] +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = space +indent_size = 4 +charset = utf-8 + +[*.js] +indent_size = 2 +indent_style = space + +[*.md] +trim_trailing_whitespace = false diff --git a/example1.html b/example1.html index 3b88d7656..6bf96f16d 100644 --- a/example1.html +++ b/example1.html @@ -1,29 +1,35 @@ -Speedtest + Speedtest + -

Speedtest

-

IP Address

-
-

Download

-
-

Upload

-
-

Latency

-
- +

Speedtest

+ +

IP Address

+

+ +

Download

+

+ +

Upload

+

+ +

Latency

+

+ + - \ No newline at end of file + diff --git a/example2.html b/example2.html index f384035c2..af945dfea 100644 --- a/example2.html +++ b/example2.html @@ -1,78 +1,91 @@ - - Speedtest - - - -

Speedtest

-
-
Download
-
  
-
Mbit/s
-
-
-
Upload
-
  
-
Mbit/s
-
-
-
Latency
-
  
-
ms
-
-
-
Jitter
-
  
-
ms
-
-
- - - \ No newline at end of file + div.test { + display: inline-block; + margin: 1em; + text-align: center; + } + + div.testName, + div.meterUnit { + font-size: 3vw; + } + + div.meter { + font-size: 6vw; + line-height: 1.5em; + height: 1.5em !important; + } + + .flash { + animation: flash 0.6s linear infinite; + } + + @keyframes flash { + 0% { opacity: 0.6; } + 50% { opacity: 1; } + } + + + + +

Speedtest

+
+
Download
+
  
+
Mbit/s
+
+
+
Upload
+
  
+
Mbit/s
+
+
+
Latency
+
  
+
ms
+
+
+
Jitter
+
  
+
ms
+
+
+ + + diff --git a/example3.html b/example3.html index 79d396ea6..f7b0d5ecb 100644 --- a/example3.html +++ b/example3.html @@ -1,116 +1,133 @@ - - Speedtest - + - - -

Speedtest

-