-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.html
More file actions
51 lines (47 loc) · 1.78 KB
/
Copy pathadmin.html
File metadata and controls
51 lines (47 loc) · 1.78 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Axinote Admin</title>
<script src="https://www.gstatic.com/firebasejs/9.23.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.23.0/firebase-auth-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.23.0/firebase-database-compat.js"></script>
<script>
firebase.initializeApp({
apiKey: "AIzaSyCmmnXzel_rrxE7xM2mm0htu4Ehh9Eo6Rs",
authDomain: "studypilot-92014.firebaseapp.com",
databaseURL: "https://studypilot-92014-default-rtdb.asia-southeast1.firebasedatabase.app",
projectId: "studypilot-92014",
storageBucket: "studypilot-92014.firebasestorage.app",
messagingSenderId: "267953191976",
appId: "1:267953191976:web:0c625dc16e7fa8b822c91d"
});
const _auth = firebase.auth();
const _db = firebase.database();
_auth.setPersistence(firebase.auth.Auth.Persistence.LOCAL).catch(() => {});
window.fb = {
auth: _auth,
database: _db,
signOut: auth => auth.signOut(),
onAuthStateChanged: (auth, cb) => auth.onAuthStateChanged(cb),
ref: (db, path) => db.ref(path),
set: (ref, data) => ref.set(data),
get: ref => ref.get(),
update: (ref, data) => ref.update(data),
remove: ref => ref.remove(),
push: (ref, data) => (data !== undefined ? ref.push(data) : ref.push()),
onValue: (ref, cb) => {
ref.on('value', cb);
return () => ref.off('value', cb);
},
};
</script>
<link rel="stylesheet" href="/css/styles.css">
<link rel="stylesheet" href="/css/admin.css">
</head>
<body>
<div id="admin-root"></div>
<script src="/js/admin.js"></script>
</body>
</html>