-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathr.html
43 lines (37 loc) · 1.18 KB
/
r.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
<!DOCTYPE html>
<html>
<head>
<title>Steam Redirect</title>
<script>
function getQueryParams(qs) {
qs = qs.split("+").join(" ");
var params = {}, tokens,
re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])]
= decodeURIComponent(tokens[2]);
}
return params;
}
var params = getQueryParams(document.location.search);
function redirect() {
if (typeof params.ip === "undefined" || typeof params.port === "undefined") return;
var redirect = "steam://connect/" + params.ip + ":" + params.port;
if (typeof params.pw != "undefined") redirect = redirect + "/" + params.pw;
window.location = redirect;
}
redirect();
</script>
</head>
<body bgcolor="#333333">
<font face="verdana" color="white"><b><p id="info" align=center>Redirecting you to your location...</p></b></font>
<script>
var string;
if (typeof params.ip === "undefined" || typeof params.port === "undefined")
string = "URL must be filled with IP and Port params to work.";
else
string = "You are beeing redirected to " + params.ip + ":" + params.port + " server...";
document.getElementById("info").innerHTML = string;
</script>
</body>
</html>