Clicks specified buttons across tabs using the Broadcast Channel API and closes tabs after successful submission.
這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。
fix(click-buttons-across-tabs): Correct rate-limiter logic and settings parser
This commit addresses two issues:
First, the timestamp-based rate limiter was vulnerable to a race condition. GM.setValue in Tab 1 did not propagate before Tab 2 read the value, resulting in tabs submitting in pairs and effectively doubling the submission rate. This is fixed by removing the timestamp logic entirely and instead awaiting a setTimeout for the requiredInterval after submission, holding the navigator.lock for the duration.
GM.setValue
await
setTimeout
requiredInterval
navigator.lock
Second, the settings menu for "submits per second" used parseInt, which prevented entering fractional rates (e.g., 0.5 for a 2-second delay). This is changed to parseFloat, and the alert text is updated.
parseInt
parseFloat
fix error handler on load, use observer for error detection, change some log colors
add rule to close tab after merge was entered, refactor check and closing functions
improve checks for state of MagicISRC
fix ISRC Hunt button selector
fix re-trigger button click on MagicISRC
add support for ISRC Hunt
replaced staggered delays by web locks API, handle MagicISRC no-op, sync debug logs among tabs
refactor whole script
automate MagicISRC error handler
add error handler for MagicISRC
quick fix for race condition
add auto click for URL seeding in release relationship editor
exclude collections from successUrlPatterns
add support for release relationship editor
add delay before closing tab, add options for delay and tab closing
add automatic tab closing feature after submission
fix path endsWith matching