sync: dev to extern-contrib
Merged
GI
5mo ago+66+66+01234567890123456789-9-9-0123456789
sync-branches: New code has just landed in dev, so let's bring extern-contrib up to speed!
Summary by Sourcery
Sync extern-contrib userscript with latest dev changes and improve initialization flow.
New Features:
- Allow early-returning from auto-login and profile checks to avoid running script logic when not logged in or redirected.
Bug Fixes:
- Prevent
CurrentUsername,SearchParams, andinitThemefrom being undefined by declaring them before asynchronous initialization. - Ensure script initialization works under Violentmonkey by wrapping async startup logic in an async IIFE instead of relying on top-level await.
- Avoid accessing
#profilewhen it is absent by checking and returning early, preventing errors on pages without a profile element.
Enhancements:
- Improve script startup logging and error handling by awaiting
mainand capturing initialization errors in a catch block. - Bump script and package versions from 3.4.6 to 3.5.1 to reflect the latest changes.
Summary by cubic
Sync extern-contrib with dev to release 3.5.1. Fix Violentmonkey top-level await error, harden init/login flow, and update version and release metadata (3.5.0/3.5.1).
- Bug Fixes
- Wrapped async init in an IIFE to make await valid in Violentmonkey.
- Predeclared
CurrentUsername,initTheme, andSearchParams; added early returns for login/profile checks to avoid undefined access and redirect loops. - Awaited
main()and added init error logging. - Bumped to 3.5.1 and added 3.5.0/3.5.1 entries in
Update.json.