Summary
- Build, debug, and publish userscripts for Tampermonkey or ScriptCat with proper metadata and runtime selection.
- Covers foreground page scripts, ScriptCat background workers, scheduled cron tasks, and subscription bundles; choose runtime before writing code Includes metadata preflight checklist: @match , @grant , @connect , @run-at , and update URLs to avoid permission and injection timing failures Provides decision tree for runtime selection and quick reference table mapping intent (DOM access, cross-origin requests, scheduled work, user config) to the right approach Highlights common mistakes: missing @grant / @connect , DOM calls in background scripts, async handling in ScriptCat workers, and config key naming with group.key pattern