-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsteam-protocol-html-redirection-new.html
123 lines (113 loc) · 4.58 KB
/
steam-protocol-html-redirection-new.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
<!DOCTYPE html>
<html>
<head>
<title>Vanilla Server - Connect</title>
<style>
body {
animation: fadeIn 1s ease-in-out forwards;
opacity: 0.5;
font-family: "Open Sans", Arial, Helvetica, sans-serif;
transition: background-color 0.3s ease;
background: linear-gradient(to bottom, #a7aba3, #ab9062);
background-color: #bbbab1;
background-image: url('https://github.com/publicdomain-nocopyright/7DTD-Public-Vanilla-Server/blob/main/splashscreen/website_background_VanillaServerRecreationlogoxcf-ezgif.com-png-to-webp-converter.webp?raw=true');
background-attachment: fixed;
background-position: center center;
background-size: cover;
height: 100vh;
margin: 0;
}
img {
animation: fadeIn 1s ease-in-out forwards;
display: block;
margin-left: auto;
margin-right: auto;
opacity: 0;
width: 500px; /* Adjusted width */
height: auto;
}
#loading {
position: absolute;
top: 40%; /* Position the loading gif higher */
left: 50%;
transform: translateX(-50%);
width: 100px; /* Adjust as needed */
}
#logo {
position: absolute;
top: 20px; /* Space from the top */
right: 20px; /* Space from the right */
width: 450px; /* Adjust width as needed */
height: auto;
animation: fadeIn 1s ease-in-out forwards;
opacity: 0;
}
#text-message {
animation: fadeIn 1s ease-in-out forwards;
opacity: 0;
position: absolute;
top: 50%; /* Positioned below the loader */
left: 50%;
transform: translate(-50%, -50%);
font-size: 18px;
color: #fff;
text-align: center;
}
#invitation {
position: absolute;
top: 30%; /* Position the invitation text above the loading gif */
left: 50%;
transform: translate(-50%, -50%);
font-size: 24px;
color: #fff;
text-align: center;
opacity: 0; /* Start hidden */
animation: fadeIn 1s ease-in-out forwards;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function () {
document.body.innerHTML = `
<div id="invitation">Invitation to join server</div>
<img id="loading" src="https://publicdomain-nocopyright.github.io/7DTD-Public-Vanilla-Server//Loading%20progress.gif" alt="Loading Progress" />
<div id="text-message">The game server was found, accept to join the server.</div>
<img id="logo" src="https://github.com/publicdomain-nocopyright/7DTD-Public-Vanilla-Server/blob/main/splashscreen/website_logo_Vanilla%20Server%20Recreation%20logoxcf.webp?raw=true" alt="Website Logo" />
`;
const loadingImage = document.getElementById('loading');
const logoImage = document.getElementById('logo');
const textMessage = document.getElementById('text-message');
const invitationText = document.getElementById('invitation');
// Set opacity after load for a smooth appearance
loadingImage.style.opacity = '1';
textMessage.style.opacity = '1';
logoImage.style.opacity = '1';
invitationText.style.opacity = '1'; // Show invitation text
setTimeout(() => {
document.addEventListener('mousemove', function () {
window.close();
});
}, 1000); // Delayed to prevent immediate closure on load
var domain = "vanillaserver.eu";
window.fetch(`https://dns.google/resolve?name=${domain}&type=A`)
.then(response => response.json())
.then(data => {
if (data.Status === 0 && data.Answer) {
var ip = data.Answer[0].data;
window.location.href = `steam://connect/${ip}:26900`;
} else {
console.error("Failed to resolve IP address for the domain.");
}
})
.catch(error => {
console.error('Error:', error);
});
});
</script>
</head>
<body>
</body>
</html>