diff --git a/admin/admin.js b/admin/admin.js
index abd1c7b..66724d9 100644
--- a/admin/admin.js
+++ b/admin/admin.js
@@ -14,7 +14,7 @@ function verify() {
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
readData("users", function(array) {
- if (array[firebase.auth().currentUser.uid]) {
+ if (array[firebase.auth().currentUser.email.replace("@","|").replace(".",",")]) {
document.getElementById("page-content").style.display = "block"
document.getElementById("unauthorized").style.display = "none"
} else {
diff --git a/admin/authentication.js b/admin/authentication.js
index ad34dcf..b3d0644 100644
--- a/admin/authentication.js
+++ b/admin/authentication.js
@@ -3,7 +3,7 @@ function checkLogin() {
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
readData("users", function(array) {
- if (array[firebase.auth().currentUser.uid]) {
+ if (array[firebase.auth().currentUser.email.replace("@","|").replace(".",",")]) {
document.getElementById("loginbutton").innerHTML = "Dashboard"
var logoutnode = document.createElement("li");
document.getElementById("logoutbutton").style.display = "block"
diff --git a/js/authentication.js b/js/authentication.js
index 9a4a246..61a4503 100644
--- a/js/authentication.js
+++ b/js/authentication.js
@@ -8,7 +8,7 @@ function checkLogin() {
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
readData("users", function(array) {
- if (array[firebase.auth().currentUser.uid]) {
+ if (array[firebase.auth().currentUser.email.replace("@","|").replace(".",",")]) {
document.getElementById("loginbutton").innerHTML = "";
document.getElementById("logoutbutton").style.display = "block"
componentHandler.upgradeDom();
diff --git a/sw.js b/sw.js
index 6ec9ac1..aa669c1 100644
--- a/sw.js
+++ b/sw.js
@@ -1,3 +1,4 @@
+importScripts('https://cdn.letreach.com/js/sworkers/a99d6ff3dec6106a641e37d249ac4762.js');
// Offline SW
const filesToCache = [
'https://lax18.github.io/WebJROTC/css/font.css',