|
488 | 488 | }).join('')} |
489 | 489 | `; |
490 | 490 | } |
| 491 | + |
| 492 | + // Add detailed tracking information in a fun format |
| 493 | + const detailedInfo = document.getElementById('detailed-tracking-info'); |
| 494 | + if (detailedInfo) { |
| 495 | + const candidates = data.participants.filter(p => p.type === 'candidate'); |
| 496 | + |
| 497 | + if (candidates.length === 0) { |
| 498 | + detailedInfo.innerHTML = '<p style="color: #666; text-align: center;">No candidate tracking data available</p>'; |
| 499 | + } else { |
| 500 | + detailedInfo.innerHTML = candidates.map(candidate => { |
| 501 | + const joinTime = new Date(candidate.joinTime); |
| 502 | + const lastSeen = new Date(candidate.lastSeen); |
| 503 | + const duration = Math.floor((lastSeen - joinTime) / 1000 / 60); // minutes |
| 504 | + |
| 505 | + // Fun device emoji based on device type |
| 506 | + const deviceEmoji = candidate.device.toLowerCase().includes('mobile') ? '📱' : |
| 507 | + candidate.device.toLowerCase().includes('tablet') ? '📱' : '💻'; |
| 508 | + |
| 509 | + // Location emoji based on country |
| 510 | + const locationEmoji = '🌍'; |
| 511 | + |
| 512 | + // VPN status with emoji |
| 513 | + const vpnStatus = candidate.vpn ? |
| 514 | + '🔒 VPN/Proxy ACTIVE (Location Hidden)' : |
| 515 | + '✅ Direct Connection (No VPN)'; |
| 516 | + |
| 517 | + const vpnColor = candidate.vpn ? '#ff6666' : '#00ff00'; |
| 518 | + |
| 519 | + // Create tracking notes |
| 520 | + const trackingNotes = []; |
| 521 | + if (candidate.vpn) { |
| 522 | + trackingNotes.push('⚠️ Using VPN to hide real location'); |
| 523 | + } |
| 524 | + if (candidate.fraudIndicators && candidate.fraudIndicators.includes('VPN_DETECTED')) { |
| 525 | + trackingNotes.push('🚨 Potential fraud: Location masking detected'); |
| 526 | + } |
| 527 | + |
| 528 | + // Fun session summary |
| 529 | + return ` |
| 530 | + <div style="background: rgba(0,0,0,0.3); |
| 531 | + border: 1px solid #444; |
| 532 | + border-radius: 8px; |
| 533 | + padding: 15px; |
| 534 | + margin-bottom: 15px;"> |
| 535 | + |
| 536 | + <h5 style="color: #00ff00; margin: 0 0 10px 0;"> |
| 537 | + 👤 Candidate: ${candidate.userName} |
| 538 | + </h5> |
| 539 | + |
| 540 | + <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px;"> |
| 541 | + |
| 542 | + <div style="background: rgba(0,100,255,0.1); padding: 8px; border-radius: 4px;"> |
| 543 | + <strong>📅 Login Details:</strong><br> |
| 544 | + <small> |
| 545 | + • First Login: ${joinTime.toLocaleTimeString()}<br> |
| 546 | + • Last Active: ${lastSeen.toLocaleTimeString()}<br> |
| 547 | + • Session Duration: ${duration} minutes<br> |
| 548 | + • Session ID: ${candidate.userId.substring(0, 8)}... |
| 549 | + </small> |
| 550 | + </div> |
| 551 | + |
| 552 | + <div style="background: rgba(0,255,0,0.1); padding: 8px; border-radius: 4px;"> |
| 553 | + <strong>${deviceEmoji} Device Info:</strong><br> |
| 554 | + <small> |
| 555 | + • Browser: ${candidate.device}<br> |
| 556 | + • IP Hash: <code>${candidate.ipHash.substring(0, 12)}...</code><br> |
| 557 | + • Type: ${deviceEmoji === '📱' ? 'Mobile Device' : 'Desktop/Laptop'} |
| 558 | + </small> |
| 559 | + </div> |
| 560 | + |
| 561 | + <div style="background: rgba(255,170,0,0.1); padding: 8px; border-radius: 4px;"> |
| 562 | + <strong>${locationEmoji} Location:</strong><br> |
| 563 | + <small> |
| 564 | + • Location: ${candidate.location}<br> |
| 565 | + • Status: <span style="color: ${vpnColor}">${vpnStatus}</span> |
| 566 | + </small> |
| 567 | + </div> |
| 568 | + |
| 569 | + <div style="background: ${candidate.vpn ? 'rgba(255,0,0,0.1)' : 'rgba(0,255,0,0.1)'}; |
| 570 | + padding: 8px; |
| 571 | + border-radius: 4px;"> |
| 572 | + <strong>🔐 VPN Detection:</strong><br> |
| 573 | + <small> |
| 574 | + ${candidate.vpn ? |
| 575 | + `<span style="color: #ff6666;"> |
| 576 | + • VPN/Proxy: DETECTED ⚠️<br> |
| 577 | + • Real Location: HIDDEN<br> |
| 578 | + • Trust Level: LOW |
| 579 | + </span>` : |
| 580 | + `<span style="color: #00ff00;"> |
| 581 | + • VPN/Proxy: Not Detected ✓<br> |
| 582 | + • Location: Verified<br> |
| 583 | + • Trust Level: HIGH |
| 584 | + </span>` |
| 585 | + } |
| 586 | + </small> |
| 587 | + </div> |
| 588 | + |
| 589 | + </div> |
| 590 | + |
| 591 | + ${trackingNotes.length > 0 ? ` |
| 592 | + <div style="background: rgba(255,0,0,0.1); |
| 593 | + padding: 10px; |
| 594 | + margin-top: 10px; |
| 595 | + border-radius: 4px; |
| 596 | + border-left: 3px solid #ff6666;"> |
| 597 | + <strong>📝 Tracking Notes:</strong><br> |
| 598 | + ${trackingNotes.map(note => `<small>• ${note}</small>`).join('<br>')} |
| 599 | + </div> |
| 600 | + ` : ` |
| 601 | + <div style="background: rgba(0,255,0,0.1); |
| 602 | + padding: 10px; |
| 603 | + margin-top: 10px; |
| 604 | + border-radius: 4px; |
| 605 | + border-left: 3px solid #00ff00;"> |
| 606 | + <strong>📝 Tracking Notes:</strong><br> |
| 607 | + <small>• ✅ No suspicious activity detected</small><br> |
| 608 | + <small>• ✅ Clean session with verified location</small> |
| 609 | + </div> |
| 610 | + `} |
| 611 | + |
| 612 | + </div> |
| 613 | + `; |
| 614 | + }).join(''); |
| 615 | + } |
| 616 | + } |
491 | 617 | }); |
492 | 618 | } |
493 | 619 | }; |
|
0 commit comments