You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64Lines changed: 64 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -527,6 +527,70 @@ preventTabClose(false);
527
527
528
528
---
529
529
530
+
# ⏱️ Idle Timer API – webdev-power-kit
531
+
532
+
This module helps you detect when a user becomes inactive (idle) for a certain amount of time — perfect for auto-logout, showing alerts, or stopping background activity.
533
+
534
+
---
535
+
536
+
## ✨ Features
537
+
538
+
* Track if user is inactive for X seconds
539
+
* Automatically resets on any activity (scroll, key, mouse, touch)
540
+
* Lightweight and easy to use
541
+
* Uses native browser events
542
+
543
+
---
544
+
545
+
## ✅ Functions
546
+
547
+
### 1. `startIdleTimer(seconds, onIdle)`
548
+
549
+
📌 Starts tracking user activity and runs your callback when idle.
0 commit comments