-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
166 lines (135 loc) · 4.48 KB
/
index.html
File metadata and controls
166 lines (135 loc) · 4.48 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Game Launcher</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<script>
//window.location.href = '/mait';
</script>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
h1 {
text-align: center;
}
#form-container {
max-width: 400px;
margin: 20px auto;
}
label {
display: block;
margin-bottom: 8px;
}
input, select, button {
width: 100%;
padding: 10px;
margin-bottom: 15px;
box-sizing: border-box;
}
button {
background-color: #40403f;
color: white;
border: none;
cursor: pointer;
}
button:hover {
background-color: #616160;
}
.button1 {
font: bold 11px Arial;
text-decoration: none;
background-color: #EEEEEE;
color: #333333;
padding: 2px 6px 2px 6px;
border-top: 1px solid #CCCCCC;
border-right: 1px solid #333333;
border-bottom: 1px solid #333333;
border-left: 1px solid #CCCCCC;
}
</style>
</head>
<body>
<!-- Game Configurations -->
<script>
const gameConfigurations = [
{ id: "603450464", name: "Racing Game" },
{ id: "941870005", name: "Slither.io Server 1" },
{ id: "605588652", name: "Taco Burp" },
{ id: "948483411", name: "Multiplayer Platformer" },
{ id: "924766226", name: "Roblox Multiplayer Tower Obby" },
{ id: "943016786", name: "Placeholder" },
{ id: "943016786", name: "Placeholder" }
];
</script>
<script>
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); };
</script>
<script defer src="/_vercel/insights/script.js"></script>
<h1>Game Launcher</h1>
<a href="generator.html" target="_blank" onclick="window.open('generator.html', 'Popup', 'width=400,height=200'); return false;">
Generate Name Link
</a>
<br>
<br>
<a href="mait" target="_blank" onclick="window.open('mait',); return false;">
DEV mode
</a>
<form id="form-container" action="/" netlify>
<label for="name">Enter Your Name:</label>
<input type="text" id="name" name="name" placeholder="Your Name">
<label for="game">Select a Game:</label>
<select id="game" name="selectedGame">
<script>
// Populate the dropdown menu with game options
gameConfigurations.forEach(game => {
document.write(`<option value="${game.id}">${game.name}</option>`);
});
</script>
</select>
<button onclick="generateEmbed()">Launch!</button>
</form>
<script>
// Function to get URL parameters
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
// Autofill form fields with URL parameters
document.addEventListener('DOMContentLoaded', function () {
var nameField = document.getElementById('name');
var selectedGameField = document.getElementById('selectedGame');
// Autofill 'name' field
var nameParam = getParameterByName('name');
if (nameParam !== null) {
nameField.value = nameParam;
}
// Autofill 'selectedGame' field
var selectedGameParam = getParameterByName('selectedGame');
if (selectedGameParam !== null) {
selectedGameField.value = selectedGameParam;
}
});
</script>
<script>
function generateEmbed() {
const name = document.getElementById('name').value;
const selectedGame = document.getElementById('game').value;
if (name && selectedGame) {
const url = `https://turbowarp.org/${selectedGame}/embed?username=${name}&autoplay`;
window.open(url, 'EmbedPopup', 'width=1000,height=1000');
} else {
alert('Please enter your name and select a game.');
}
}
</script>
</body>
</html>