-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchat.html
54 lines (46 loc) · 1.64 KB
/
chat.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
<!DOCTYPE html>
<html>
<head>
<title>Snappy</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"/>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<div class="member-area">
<div class="user-info">
<span id="username"></span>
<span class="logout">LogOut</span>
</div>
<div class="members" id="members">
</div>
</div>
<div class="message-area">
<div class="chat-info" id="selected-member">Welcome
</div>
<div class="messages" id="messages">
</div>
<div class="chat-form">
<input type="hidden" id="chat-id" />
<input type="hidden" id="prev-chat-id" />
<input id="message-text" type="text" class="chat-message" placeholder="Write your message and press enter... " />
<button id="send-button">Send</button>
</div>
</div>
<script src="https://www.gstatic.com/firebasejs/3.6.7/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyCvIgw5UL4LzUcCO9Y2TYL6vukAJQU6P48",
authDomain: "snappy-cc919.firebaseapp.com",
databaseURL: "https://snappy-cc919.firebaseio.com",
storageBucket: "snappy-cc919.appspot.com",
messagingSenderId: "798696262009"
};
firebase.initializeApp(config);
</script>
<script type="text/javascript" src="function.js"></script>
<script type="text/javascript" src="app.js"></script>
<script type="text/javascript" src="chat.js"></script>
</body>
</html>