-
Notifications
You must be signed in to change notification settings - Fork 2
/
Example.html
42 lines (42 loc) · 1.03 KB
/
Example.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Example RandomProxy.js</title>
<meta charset="utf-8">
<script type="text/javascript" src="RandomProxy.min.js"></script>
</head>
<body>
<h1>Example RandomProxy.js</h1>
<br><br>
<button onclick="get();">
Get Proxy
</button>
<div id="data">
<div id="loading"></div>
<div id="data_result">
</div>
</div>
<script type="text/javascript">
var loading=document.querySelector("#loading");
var data_result=document.querySelector("#data_result");
function get()
{
loading.innerHTML="<b>Loading....</b>";
proxy.get(function(data)
{
if(data !== null && data !=undefined && typeof data === 'object')
{
loading.innerHTML="";
data_result.innerHTML="IP : " + data.ip + "<br>Port : " + data.port + "<br>Country : " + data.country + "<br>";
data_result.innerHTML+="<hr><code>" + JSON.stringify(data) + "</code>";
}
else
{
loading.innerHTML="Error!";
data_result.innerHTML="";
}
});
}
</script>
</body>
</html>