-
Notifications
You must be signed in to change notification settings - Fork 0
/
arena.html
28 lines (28 loc) · 1.02 KB
/
arena.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Arena Starting...</title>
<script>
// This script runs when the page loads
window.onload = function() {
// Get the query parameters from the URL
const urlParams = new URLSearchParams(window.location.search);
// Get the 'battle' parameter
const battle = urlParams.get('battle');
// If 'battle' parameter exists, redirect to the brawlstars URL
if (battle) {
const redirectUrl = `brawlstars://createAndJoinRoom?roomname=${battle}&friendly=1`;
window.location.href = redirectUrl;
} else {
// If 'battle' parameter is missing, show an error message
document.body.innerHTML = '<h1>Error: Missing battle parameter in the URL.</h1>';
}
};
</script>
</head>
<body>
<h1>Starting arena... </h1>
</body>
</html>