mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-12-27 01:59:08 +00:00
even more of a last-ditch effort to make js not multithread everything
This commit is contained in:
parent
7d02c6373c
commit
290110274b
@ -13,7 +13,6 @@ function closeNav() {
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
var promise1 = new Promise(function(resolve, reject) {
|
||||
document.getElementById('sideload').style.display = 'block';
|
||||
var config = {
|
||||
apiKey: "(insert the TitanScout Api Key Here)",
|
||||
@ -25,17 +24,7 @@ window.onload = function() {
|
||||
};
|
||||
//eventually find a less-jank way to do this tho
|
||||
firebase.initializeApp(config);
|
||||
promise2 = new Promise(function(resolve,reject){
|
||||
setTimeout(function(){
|
||||
user = firebase.auth().currentUser
|
||||
resolve(user)
|
||||
},10)
|
||||
});
|
||||
promise2.then(function(user){
|
||||
resolve(user)
|
||||
})
|
||||
});
|
||||
promise1.then(function(user) {
|
||||
firebase.auth().onAuthStateChanged(function(user) {
|
||||
if (user != null) {
|
||||
if (user.displayName != null) {
|
||||
document.getElementById('status').innerHTML = "You are signed in as: " + user.displayName;
|
||||
|
Loading…
Reference in New Issue
Block a user