Spaces:
Running
Running
Update main.js
Browse files
main.js
CHANGED
@@ -219,4 +219,37 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
219 |
|
220 |
// --- INITIALIZATION ---
|
221 |
fetchPoisAndCreateAREntities();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
});
|
|
|
219 |
|
220 |
// --- INITIALIZATION ---
|
221 |
fetchPoisAndCreateAREntities();
|
222 |
+
// --- FINAL SYSTEM CHECK ---
|
223 |
+
const debugLog = document.getElementById('debug-log');
|
224 |
+
if (debugLog) {
|
225 |
+
let debugMessage = "--- FINAL SYSTEM CHECK ---\n\n";
|
226 |
+
let testsPassed = true;
|
227 |
+
|
228 |
+
// Test 1: Check for the settings button itself
|
229 |
+
if (document.getElementById('settingsBtn')) {
|
230 |
+
debugMessage += "✅ Test 1: Settings Button HTML (id='settingsBtn') was FOUND.\n";
|
231 |
+
} else {
|
232 |
+
debugMessage += "❌ Test 1: Settings Button HTML (id='settingsBtn') was NOT FOUND.\n";
|
233 |
+
testsPassed = false;
|
234 |
+
}
|
235 |
+
|
236 |
+
// Test 2: Check for the settings modal window
|
237 |
+
if (document.getElementById('settingsModal')) {
|
238 |
+
debugMessage += "✅ Test 2: Settings Modal HTML (id='settingsModal') was FOUND.\n";
|
239 |
+
} else {
|
240 |
+
debugMessage += "❌ Test 2: Settings Modal HTML (id='settingsModal') was NOT FOUND.\n";
|
241 |
+
testsPassed = false;
|
242 |
+
}
|
243 |
+
|
244 |
+
// Display the final results
|
245 |
+
debugLog.textContent = debugMessage;
|
246 |
+
|
247 |
+
if(testsPassed) {
|
248 |
+
debugLog.style.borderColor = 'green';
|
249 |
+
debugLog.style.color = 'green';
|
250 |
+
debugLog.style.backgroundColor = '#DFF2BF';
|
251 |
+
debugLog.textContent += "\nAll elements found. The button should be working.";
|
252 |
+
}
|
253 |
+
}
|
254 |
+
// --- END OF SYSTEM CHECK ---
|
255 |
});
|