-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebsite-status.html
More file actions
161 lines (142 loc) · 5.99 KB
/
website-status.html
File metadata and controls
161 lines (142 loc) · 5.99 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Website Status Check - IGNITE Part Share</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 50px auto;
padding: 20px;
}
.status-item {
margin: 10px 0;
padding: 15px;
border-radius: 5px;
border-left: 4px solid #007bff;
}
.success { background-color: #d4edda; color: #155724; border-left-color: #28a745; }
.error { background-color: #f8d7da; color: #721c24; border-left-color: #dc3545; }
.warning { background-color: #fff3cd; color: #856404; border-left-color: #ffc107; }
.info { background-color: #d1ecf1; color: #0c5460; }
.page-link {
display: inline-block;
margin: 5px;
padding: 10px 15px;
background-color: #007bff;
color: white;
text-decoration: none;
border-radius: 5px;
}
.page-link:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<h1>IGNITE Part Share - Website Status Check</h1>
<div id="status-results"></div>
<h2>Quick Navigation</h2>
<div>
<a href="index.html" class="page-link">Homepage</a>
<a href="login.html" class="page-link">Login</a>
<a href="profile.html" class="page-link">Profile</a>
<a href="donate.html" class="page-link">Donate</a>
<a href="request.html" class="page-link">Request</a>
<a href="browse.html" class="page-link">Browse</a>
<a href="leaderboard.html" class="page-link">Leaderboard</a>
<a href="contact.html" class="page-link">Contact</a>
</div>
<!-- Firebase SDK -->
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-app-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-auth-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-firestore-compat.js"></script>
<script src="https://www.gstatic.com/firebasejs/9.0.0/firebase-storage-compat.js"></script>
<!-- Firebase Config -->
<script src="firebase-config.js"></script>
<!-- Auth Script -->
<script src="auth.js"></script>
<script src="script.js"></script>
<script>
function addStatus(message, type = 'info') {
const resultsDiv = document.getElementById('status-results');
const div = document.createElement('div');
div.className = `status-item ${type}`;
div.textContent = message;
resultsDiv.appendChild(div);
}
// Check website functionality
window.addEventListener('load', function() {
addStatus('🔍 Checking website functionality...', 'info');
// Check Firebase
if (typeof firebase !== 'undefined') {
addStatus('✅ Firebase SDK loaded successfully', 'success');
} else {
addStatus('❌ Firebase SDK not loaded', 'error');
}
// Check Auth
if (typeof auth !== 'undefined') {
addStatus('✅ Firebase Auth initialized', 'success');
} else {
addStatus('❌ Firebase Auth not initialized', 'error');
}
// Check Firestore
if (typeof db !== 'undefined') {
addStatus('✅ Firestore Database initialized', 'success');
} else {
addStatus('❌ Firestore Database not initialized', 'error');
}
// Check Storage
if (typeof firebase.storage !== 'undefined') {
addStatus('✅ Firebase Storage available', 'success');
} else {
addStatus('❌ Firebase Storage not available', 'error');
}
// Check Auth functions
if (typeof signOut === 'function') {
addStatus('✅ Authentication functions available', 'success');
} else {
addStatus('❌ Authentication functions not available', 'error');
}
// Check Social functions
if (typeof openSocialMedia === 'function') {
addStatus('✅ Social media functions available', 'success');
} else {
addStatus('❌ Social media functions not available', 'error');
}
// Check current auth state
if (window.currentUser) {
addStatus('✅ User is currently signed in: ' + window.currentUser.email, 'success');
} else {
addStatus('ℹ️ No user currently signed in', 'info');
}
// Check FIRST verification
if (window.isFirstVerified) {
addStatus('✅ User is FIRST verified', 'success');
} else {
addStatus('ℹ️ User is not FIRST verified', 'info');
}
// Check for console errors
const originalError = console.error;
const errors = [];
console.error = function(...args) {
errors.push(args.join(' '));
originalError.apply(console, args);
};
setTimeout(() => {
if (errors.length > 0) {
addStatus('⚠️ Console errors detected: ' + errors.length + ' errors', 'warning');
errors.forEach(error => {
addStatus(' Error: ' + error, 'error');
});
} else {
addStatus('✅ No console errors detected', 'success');
}
}, 2000);
addStatus('🎉 Website status check complete!', 'success');
});
</script>
</body>
</html>