-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
132 lines (123 loc) · 4.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="en">
<head>
<title>Real SpeedTest</title>
<meta charset="UTF-8">
<meta name="description" content="Test your internet connection for download speed and latency for real life usage.">
<meta name="keywords" content="speedtest">
<meta name="author" content="TheDoggyBrad">
<link rel="icon" type="image/x-icon" href="resources/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, sans-serif;
background-color: #24242b;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.container {
background: rgb(41, 38, 38);
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
width: 400px;
text-align: center;
}
h1 {
font-size: 1.5em;
margin-bottom: 20px;
}
label {
display: block;
margin: 10px 0;
cursor: pointer;
font-size: 1em;
}
input[type="radio"] {
margin-right: 10px;
}
button {
background-color: #5cb85c;
color: white;
border: none;
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
font-size: 1em;
margin-top: 20px;
transition: background-color 0.3s;
}
button:hover {
background-color: #4cae4c;
}
.error {
color: red;
font-size: 0.9em;
margin-top: 10px;
}
</style>
<script>
function redirect() {
const selectedOption = document.querySelector('input[name="connection"]:checked');
const errorElement = document.getElementById('error');
if (selectedOption) {
errorElement.textContent = ''; // Clear any previous error messages
switch (selectedOption.value) {
case '5G/Fiber Optics':
window.location.href = 'large.html';
break;
case 'LTE-A/Starlink/Cable':
window.location.href = 'medium.html';
break;
case 'LTE/Other Satellite':
window.location.href = 'average.html';
break;
case '3G/DSL':
window.location.href = 'low.html';
break;
case 'Dial-up/Data Capped':
window.location.href = 'verylow.html';
break;
case 'I do not know/Free Wifi/Coin-based Wifi':
window.location.href = 'donotknow.html';
break;
}
} else {
errorElement.textContent = 'Please select an option.';
}
}
</script>
</head>
<body>
<div class="container">
<img src="resources/favicon.png" alt="LOGO" class="imgcenter" width="64" height="64">
<h1 class="header">Real SpeedTest</h1>
<h2>What is your Internet Connection?</h2>
<h3>We just need this information to avoid you downloading a 100MB file on a DSL connection.</h3>
<form id="connectionForm">
<label>
<input type="radio" name="connection" value="5G/Fiber Optics">
5G/Fiber Optics
<input type="radio" name="connection" value="LTE-A/Starlink/Cable"> LTE-A/Starlink/Cable
</label>
<label>
<input type="radio" name="connection" value="LTE/Other Satellite"> LTE/Other Satellite
<input type="radio" name="connection" value="3G/DSL"> 3G/DSL
</label>
<label>
<input type="radio" name="connection" value="Dial-up/Data Capped"> Dial-up
<input type="radio" name="connection" value="I do not know/Free Wifi/Coin-based Wifi"> Uncertain/Free wifi
<br>
<button type="button" onclick="redirect()">Submit</button>
</label>
<div id="error" class="error"></div>
</form>
<p>Disclaimer: Selecting the inappropriate connection may cause the speeds to become unrealistic due to the nature of "file sizes".</p>
<footer style="font-size:14px;">©TheDoggyBrad Software Lab. Provided under ISC License.</footer>
</div>
</body>
</html>