You've already forked speedtest-go
							
							Migrate code from Go branch to new repo
This commit is contained in:
		
							
								
								
									
										38
									
								
								assets/example-singleServer-basic.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								assets/example-singleServer-basic.html
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
<meta charset="UTF-8" />
 | 
			
		||||
<head>
 | 
			
		||||
    <title>LibreSpeed Example</title>
 | 
			
		||||
    <link rel="shortcut icon" href="favicon.ico">
 | 
			
		||||
</head>
 | 
			
		||||
<script type="text/javascript" src="speedtest.js"></script>
 | 
			
		||||
<body>
 | 
			
		||||
    <h1>LibreSpeed Example</h1>
 | 
			
		||||
 | 
			
		||||
    <h4>IP Address</h4>
 | 
			
		||||
    <p id="ip"></p>
 | 
			
		||||
 | 
			
		||||
    <h4>Download</h4>
 | 
			
		||||
    <p id="download"></p>
 | 
			
		||||
 | 
			
		||||
    <h4>Upload</h4>
 | 
			
		||||
    <p id="upload"></p>
 | 
			
		||||
 | 
			
		||||
    <h4>Latency</h4>
 | 
			
		||||
    <p id="ping"></p>
 | 
			
		||||
 | 
			
		||||
    <script type="text/javascript">
 | 
			
		||||
        var s=new Speedtest();
 | 
			
		||||
        s.onupdate = function (data) { // when status is received, put the values in the appropriate fields
 | 
			
		||||
            document.getElementById('download').textContent = data.dlStatus + ' Mbit/s'
 | 
			
		||||
            document.getElementById('upload').textContent = data.ulStatus + ' Mbit/s'
 | 
			
		||||
            document.getElementById('ping').textContent = data.pingStatus + ' ms, ' + data.jitterStatus + ' ms jitter'
 | 
			
		||||
            document.getElementById('ip').textContent = data.clientIp
 | 
			
		||||
        }
 | 
			
		||||
        s.start(); // start the speedtest with default settings
 | 
			
		||||
    </script>
 | 
			
		||||
 | 
			
		||||
	<a href="https://github.com/librespeed/speedtest">Source code</a>
 | 
			
		||||
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user