-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.ejs
More file actions
37 lines (36 loc) · 2.11 KB
/
index.ejs
File metadata and controls
37 lines (36 loc) · 2.11 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
<link rel="stylesheet" href="styles/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="styles/index.css">
<div class="container">
<form class="room-form">
<h1>Welcome to OurTube</h1>
<p class="lead">To join a room, enter the room name and hit the button</p>
<input type="text" id="roomNameInput" class="room-form" placeholder="Room Name" required="" autofocus="">
<button id="newRoom" type="button" class="btn btn-lg btn-success">Join</button>
<div id="roomCreated" class="room-form"></div>
<h2>Instructions:</h2>
<p>You can go to any room by simply accessing:</p>
<p>Ourtubes.herokuapp.com/room/(room name)</p>
<p>Anyone in the room can add youtube urls to the queue and push that url to the bottom of everyone in that room's queue </p>
<p>Type in the room name and hit Join to access room</p>
</form>
</div>
<script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="styles/bootstrap/js/bootstrap.min.js"></script>
<script>
$('#newRoom').on('click', function(event){
var roomName = $('#roomNameInput').val();
window.location.replace("http://ourtubes.herokuapp.com/room/" + roomName);
// window.location.replace("http://localhost:3000/room/" + roomName);
// $('#roomCreated').html('<h4><a href="http://ourtubes.herokuapp.com/room/'+ roomName +'"' + '>Room Successfully created, click here to access</a></h4>');
// $.get(('http://ourtubes.herokuapp.com/newRoom/' + roomName), function(response){
// $.get(('http://localhost:3000/newRoom/' + roomName), function(response){
// if(response == 'ERROR ROOM DUPLICATE'){
// $('#roomCreated').html('<h4><a href="http://localhost:3000/room/'+ roomName +'"' + '>Room Successfully already exists at http://localhost:3000/room/' + roomName + '</a></h4>').slideDown();
// }else{
// $('#roomCreated').html('<h4><a href="http://localhost:3000/room/'+ roomName +'"' + '>Room Successfully created at http://localhost:3000/room/' + roomName + '</a></h4>').slideDown();
// window.location.replace("http://ourtubes.herokuapp.com/room/" + roomName);
// window.location.replace("http://localhost:3000/room/" + roomName);
// }
// })
});
</script>