Skip to content

Commit a13947e

Browse files
author
Archith
committed
Replace complex behavior tracking with simpler activity monitoring
- Remove unreliable behavior-tracking.js - Add activity-monitor.js using reliable browser APIs: - Visibility API for tab switch detection (actually works!) - Idle detection using mouse/keyboard activity - Focus/blur events for window tracking - Basic paste detection (limited by browser security) - Simplified approach that doesn't fight browser restrictions - Activity score calculation (0-100%) - Cleaner UI with activity dashboard - Works without special libraries This approach uses only standard browser APIs that are proven to work.
1 parent 365e421 commit a13947e

5 files changed

Lines changed: 426 additions & 75 deletions

File tree

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,9 @@ <h2>Sessions Management</h2>
609609
<span id="behavior-alert-badge" class="alert-badge" style="display: none;">0</span>
610610
<button id="close-notes">×</button>
611611
</div>
612-
<!-- Behavior Monitoring Dashboard -->
613-
<div id="behavior-dashboard" style="display: none; background: rgba(255,152,0,0.05); border: 1px solid rgba(255,152,0,0.2); border-radius: 4px; padding: 12px; margin: 10px;">
614-
<!-- Behavior metrics will be inserted here -->
612+
<!-- Activity Monitoring Dashboard -->
613+
<div id="activity-dashboard" style="display: none; background: rgba(66,165,245,0.05); border: 1px solid rgba(66,165,245,0.2); border-radius: 4px; padding: 12px; margin: 10px;">
614+
<!-- Activity metrics will be inserted here -->
615615
</div>
616616
<div id="notes-content">
617617
<div class="notes-rating-section">
@@ -716,7 +716,7 @@ <h3 class="custom-modal-title"></h3>
716716
<script src="/scripts/slack-integration.js?v=4"></script>
717717
<script src="/scripts/posthog-tracking.js?v=2"></script>
718718
<script src="/scripts/session-tracking.js?v=1"></script>
719-
<script src="/scripts/behavior-tracking.js?v=1"></script>
719+
<script src="/scripts/activity-monitor.js?v=1"></script>
720720
<script src="/scripts/app.js?v=3"></script>
721721
</body>
722722
</html>

0 commit comments

Comments
 (0)