How mdn/webextensions-examples works
This repository is a collection of independent, installable Firefox WebExtensions that demonstrate browser and page capabilities; it is not one extension with a shared user-to-result workflow. Each example has its own entry points and behavior. The graph highlights representative capability areas and preserves the two core modules identified by the source index. Source excerpts show only a few concrete relationships, so other examples are represented without inferred call chains; unsampled examples may have additional interactions not shown here.
Main entry points: authorize.js Google authorization · tabs.js Tab controls · context.js Identity controls · userscript_manager_logic.mjs Userscript logic
Components 23
Page interaction
- Apply CSS
apply-css/background.js - Beastify chooser
beastify/popup/choose_beast.js - Emoji substitution
emoji-substitution/substitute.js - Remove elements
menu-remove-element/popup.js - Page export
export-helpers/background.js
Browser controls
- Tab controls
tabs-tabs-tabs/tabs.js - Identity controls
contextual-identities/context.js - Keyboard commands
commands/background.js - Session state
session-state/background.js - Proxy blocking
proxy-blocker/background/proxy-handler.js
Data and identity
- Image collection UI
store-collected-images/webextension-plain/popup.js - Image file storage
store-collected-images/webextension-plain/deps/idb-file-storage.js - IndexedDB
- Google authorization
google-userinfo/background/authorize.js - User info flow
google-userinfo/background/main.js
Advanced APIs
- Userscript manager
userScripts-mv3/background.js - Userscript logic
userScripts-mv3/userscript_manager_logic.mjs - Userscript APIs
userScripts-mv3/userscript_api.js - DevTools panels
devtools-panels/devtools/devtools.js - Native messaging
native-messaging/add-on/background.js
Other components
- Extension user
- Firefox APIs
- Web pages
Connections 11
- Extension user → Tab controls: uses controls
tabs-tabs-tabs/tabs.js - Tab controls → Firefox APIs: queries and updates
tabs-tabs-tabs/tabs.js - Identity controls → Firefox APIs: creates and closes tabs
contextual-identities/context.js - Extension user → Identity controls: chooses identity actions
contextual-identities/context.js - Proxy blocking → Firefox APIs: handles proxy requests
proxy-blocker/background/proxy-handler.js - User info flow → Google authorization: requests token
google-userinfo/background/main.js - Google authorization → Firefox APIs: launches auth flow
google-userinfo/background/authorize.js - Userscript manager → Userscript logic: calls functions
userScripts-mv3/userscript_manager_logic.mjs - Userscript logic → Userscript APIs: registers API script
userScripts-mv3/userscript_manager_logic.mjs - Image file storage → IndexedDB: persists files
store-collected-images/webextension-plain/deps/idb-file-storage.js - Google authorization → Firefox APIs: validates with Google
google-userinfo/background/authorize.js