Clean up excessive console logging and remove duplicate app files
- Remove verbose console.log statements from WebSocket, map, and aircraft managers - Keep essential error messages and warnings for debugging - Consolidate app-new.js into app.js to eliminate confusing duplicate files - Update HTML reference to use clean app.js with incremented cache version - Significantly reduce console noise for better user experience 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e51af89d84
commit
776cef1185
7 changed files with 174 additions and 1415 deletions
|
|
@ -14,12 +14,10 @@ export class WebSocketManager {
|
|||
this.websocket = new WebSocket(wsUrl);
|
||||
|
||||
this.websocket.onopen = () => {
|
||||
console.log('WebSocket connected');
|
||||
this.onStatusChange('connected');
|
||||
};
|
||||
|
||||
this.websocket.onclose = () => {
|
||||
console.log('WebSocket disconnected');
|
||||
this.onStatusChange('disconnected');
|
||||
// Reconnect after 5 seconds
|
||||
setTimeout(() => this.connect(), 5000);
|
||||
|
|
@ -34,20 +32,6 @@ export class WebSocketManager {
|
|||
try {
|
||||
const message = JSON.parse(event.data);
|
||||
|
||||
// Debug: Log WebSocket messages to see what we're receiving
|
||||
if (message.data && message.data.aircraft) {
|
||||
const aircraftCount = Object.keys(message.data.aircraft).length;
|
||||
console.log(`📡 WebSocket: ${message.type} with ${aircraftCount} aircraft`);
|
||||
|
||||
// Log first few aircraft with coordinates
|
||||
let count = 0;
|
||||
for (const [icao, aircraft] of Object.entries(message.data.aircraft)) {
|
||||
if (count < 3 && aircraft.Latitude && aircraft.Longitude) {
|
||||
console.log(`📡 ${icao}: lat=${aircraft.Latitude}, lon=${aircraft.Longitude}`);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
this.onMessage(message);
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue