forked from skycube/jqspeedtest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (75 loc) · 3.55 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="Is a simple tool that can be used for measuring your latency.">
<meta name="author" content="TheDoggyBrad Software Lab">
<link rel="icon" type="image/x-icon" href="favicon.png">
<title>LatencyTester</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
.stopbuttons{
display:none;
}
</style>
</head>
<body>
<div class="container">
<br>
<!-- Ping Test-->
<div class="panel panel-default">
<div class="panel-heading">Test how stable your latency is by measuring it 100 times.<br>Brought to you by TheDoggyBrad Software Lab.</div>
<div class="panel-body">
<div class="row">
<div class="col-md-3">
<button type="button" class="btn btn-lg btn-success startbuttons" id="Demo-3-StartButton" >Start</button>
<button type="button" class="btn btn-lg btn-danger stopbuttons" id="Demo-3-StopButton" >Stop</button>
<span id="Demo-3-State" class="btn btn-lg btn-default disabled">stopped</span>
</div>
</div>
<div class="row">
<div id="Demo-3-graph"></div>
</div>
</div>
</div>
<!-- Ping Test -->
</div> <!-- .container -->
<!-- jQuery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js" integrity="sha512-ju6u+4bPX50JQmgU97YOGAXmRMrD9as4LE05PdC3qycsGQmjGlfm041azyB1VfCXpkpt1i9gqXCT6XuxhBJtKg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- Morris.js Charts JS and CSS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.2/raphael-min.js"></script>
<script src="https://cdn.statically.io/gh/thedoggybrad/latencytester/master/morrischarts/morris.js"></script>
<link rel="stylesheet" href="https://cdn.statically.io/gh/thedoggybrad/latencytester/master/morrischarts/morris.css">
<!-- Include JQSpeedTest -->
<script src="https://cdn.statically.io/gh/thedoggybrad/latencytester/0cc23a21/JQSpeedTest.js"></script>
<!-- Test Area -->
<script>
/**
* Helper Function for the demos to calculate the average (very simple!)
*/
function calcAverage(num1,num2){
if(num2 == 0){
return num1;
}else if(num1 == 0){
return num2;
}else{
return ((parseFloat(num1)+parseFloat(num2))/2).toFixed(2)
}
}
</script>
<!-- Include the sample js -->
<script src="https://cdn.statically.io/gh/thedoggybrad/latencytester/0cc23a21/latency.js"></script>
</body>