-
Notifications
You must be signed in to change notification settings - Fork 0
/
index-old.html
46 lines (39 loc) · 2.01 KB
/
index-old.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BingeBud | Serverless Watch Together | Elvis Tony</title>
<meta name="description" content="A Serverless Watch Together Solution built on a Peer to Peer Network">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6 text-center">
<h1>BingeBud <span>v0.6.5</span></h1>
<button class="button btn btn-primary" id="create-room">Create New Theatre</button>
<div class="mt-4" id="linkSection" style="display: none;">
<div class="form-group mb-2">
<input class="form-control mt-2" type="text" name="" readonly placeholder="Click the button to create a new Room" id="link-url">
</div>
<a target="_blank" class="btn button btn-warning" id="link-admin" href="#">Open Admin Panel</a>
<a target="_blank" class="btn button btn-success" id="link-theatre" href="#">Open Theatre</a>
<button class="btn btn-info button" is="google-cast-button">Cast</button>
</div>
</div>
</div>
</div>
<script>
var createBtn = document.getElementById('create-room');
const baseURL = 'https://elvistony.dev/bingebuddies/'
createBtn.addEventListener('click',()=>{
var roomId = Math.random().toString(36).slice(2);
document.getElementById('linkSection').style.display='block';
document.getElementById('link-url').value = roomId;
document.getElementById('link-theatre').setAttribute('href',baseURL+"play/#/"+roomId);
document.getElementById('link-admin').setAttribute('href',baseURL+"admin/#/"+roomId);
})
</script>
</body>
</html>