How platformer444/scratchaddons works
Scratch Addons is a browser extension that lets users enable and configure community-built features and themes for Scratch. The main workflow runs from settings and manifest-based addon selection through background coordination and content-script injection, where userscripts use the addon API to interact with Scratch pages. The extension also provides popup surfaces, authentication/session handling, and Scratch Messaging. The README documents manifest-driven injection and broader addon capabilities; unsampled implementation details are represented only where the file tree or README supports them.
Main entry points: background Background coordinator · popup/index.js Extension popup · addons Addon catalog · settings/index.js Settings interface
Components 19
Configuration
- Settings interface
webpages/settings/index.js - Addon manifests
background/load-addon-manifests.js - Error page
webpages/error/index.js
Extension runtime
- Background coordinator
background - Userscript injection
content-scripts/inject/run-userscript.js - Content scripts
content-scripts/cs.js - Addon APIs
addon-api/content-script/Addon.js - Redux bridge
addon-api/content-script/ReduxHandler.js
Scratch page features
- Addon catalog
addons - Editor features
addons/paint-snap/userscript.js - Website features
addons/dark-www/experimental_forums_preview.js
Services and state
- Settings storage
- Session and auth
background/handle-auth.js
Popup surfaces
- Extension popup
webpages/popup/index.js - Scratch Messaging
popups/scratch-messaging/popup.js - Cloud Games popup
popups/cloud-games/popup.js
Other components
- Extension user
- Scratch website
- Scratch services
Connections 23
- Extension user → Settings interface: configures addons
- Settings interface → Settings storage: reads and writes
- Settings interface → Background coordinator: sends settings changes
- Background coordinator → Addon manifests: loads manifests
- Background coordinator → Settings storage: reads settings
- Background coordinator → Userscript injection: provides addon runtime data
- Userscript injection → Content scripts: injects scripts
- Content scripts → Addon catalog: runs enabled addons
- Addon catalog → Addon APIs: uses APIs
- Addon APIs → Scratch website: interacts with page
- Addon APIs → Redux bridge: reads and dispatches state
- Redux bridge → Scratch website: observes page state
- Addon catalog → Editor features: includes editor features
- Addon catalog → Website features: includes site themes
- Extension user → Extension popup: opens popup
- Extension popup → Background coordinator: requests addon settings
- Extension popup → Settings interface: opens quick settings
- Extension popup → Scratch Messaging: opens enabled popup
- Extension popup → Cloud Games popup: opens enabled popup
- Background coordinator → Session and auth: tracks session
- Session and auth → Scratch services: fetches session and cookies
- Session and auth → Content scripts: notifies session changes
- Extension user → Scratch website: uses Scratch