Reclaim stale script lock after crash (v1.3.1)

The single-tab lock was only released in beforeunload, so a browser
crash or power-cut left the localStorage key behind and the script
exited on every subsequent load until site data was cleared.

Treat a lock not refreshed within 90s as dead and take it over, and
add a 30s heartbeat so a live instance keeps its lock fresh.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chatter
2026-07-22 11:48:20 -04:00
parent f64823fb74
commit 74d8efb1a8
2 changed files with 28 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
// ==UserScript==
// @name cams
// @namespace http://tampermonkey.net/
// @version 1.3.0
// @version 1.3.1
// @description Set maxDockedCamsForUser, keep-alive, and multi-poke
// @author You
// @match https://chat.fabswingers.com/*