awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
mdn avatar

mdn/webextensions-examples

0
View on GitHub↗
4,447 stars·2,632 forks·JavaScript·MPL-2.0·15 viewsdeveloper.mozilla.org/en-US/Add-ons/WebExtensions↗

Webextensions Examples

This project is a reference library and collection of practical code samples for building browser extensions using WebExtensions APIs. It provides implementation guides and functional examples for core extension components, including content scripts, background processes, and browser action popups.

The repository focuses on demonstrating specific implementation patterns for browser UI customization and web page manipulation. It includes samples for creating sidebars, context menus, and options pages, as well as techniques for injecting scripts and styles to alter DOM elements and page appearance.

The project covers a wide range of capabilities, including inter-process communication through messaging bridges, network request interception and modification, and the management of browser tabs, history, and bookmarks. It also provides examples for state persistence via local storage, identity verification using OAuth2, and the integration of custom panels within browser developer tools.

Features

  • WebExtensions API Development - Serves as a comprehensive reference library for building browser extensions using standard WebExtensions APIs.
  • Local Data Stores - Implements mechanisms for managing persistent data locally on the user's device to ensure it survives restarts.
  • Browser Storage Persistence - Persists application state and user input across browser sessions using browser-specific storage mechanisms.
  • In-Page Script Execution - Implements the ability to execute JavaScript within web pages for DOM manipulation and clipboard access.
  • Inter-Component Messaging - Implements messaging layers to synchronize state between background scripts and content scripts.
  • Code Examples - Offers a collection of practical code samples demonstrating specific WebExtensions API implementation patterns.
  • Inter-Process Communication - Provides implementation patterns for exchanging data between isolated extension components and native applications.
  • WebExtensions Implementation Guides - Provides practical samples for implementing complex extension features like cross-component and native messaging.
  • Extension Background Scripts - Implements background scripts that listen for browser events and coordinate actions across extension components.
  • Script-to-Background Messaging - Implements messaging bridges that allow injected content scripts to trigger actions in the background process.
  • Configuration Manifests - Uses structured JSON metadata files to define permissions, script injection rules, and UI elements.
  • Extension Manifests - Provides implementation samples for extension manifest files that define capabilities and API permissions.
  • Extension State Persistence - Implements state persistence for extensions using local storage and inter-process messaging.
  • Inter-Process Communication - Implements structured data exchange between isolated contexts such as content scripts, popups, and background pages.
  • Browser Extension Toolbar Buttons - Provides implementation guides for registering toolbar buttons that trigger extension-specific functions.
  • Browser Toolbar Popups - Shows how to create small HTML popup windows triggered by browser toolbar icons.
  • Browser Context Menu Extensions - Provides samples for adding custom actions to the browser's right-click menu.
  • Page Content Modifications - Provides examples of modifying web page structure and replacing existing content with custom elements via script injection.
  • Browser Interface Customizations - Demonstrates how to create custom popups, sidebars, and context menus to modify the browser's native UI.
  • Extension Options Pages - Provides a dedicated settings interface for browser extensions to allow user configuration.
  • Sidebars - Implements persistent side panels to provide user interfaces alongside the main browser window.
  • Browser Extension Script Managers - Provides tools to register, update, and unregister custom scripts to be executed on specific websites.
  • Lifecycle Management - Controls the dynamic registration and unregistration of scripts to manage when custom code is active.
  • Browser Extensions - Provides a library of functional examples and tools for building software that integrates into browser environments.
  • Tab Management - Provides capabilities to create, move, and update browser tabs for page organization.
  • CSS Style Injections - Adds or removes CSS stylesheets from active browser tabs based on user interaction.
  • Script Injections - Injects packaged JavaScript code into specific web pages based on URL match patterns.
  • Web Content Injections - Offers examples for injecting scripts and styles into active tabs to modify web page content and behavior.
  • Content Script Injection Architectures - Implements architectures for sending and receiving data between content scripts and background processes.
  • Runtime Script and CSS Injection - Enables programmatically inserting code into active tabs at runtime for on-demand page interactions.
  • DOM Manipulation - Provides techniques for injecting JavaScript and CSS to dynamically update the structure and content of web pages.
  • Web Page Customizations - Implements techniques for modifying the appearance and behavior of existing web pages via script and style injection.
  • Browser Bookmark Management - Provides capabilities to create, remove, and search for browser bookmarks based on the active tab URL.
  • Browser DevTools Panel Extensions - Provides examples for registering custom panels and sidebars within the browser's developer tools.
  • DevTools Inspector Interactions - Provides functions to programmatically select elements and modify styles of inspected elements within the browser.
  • DOM Element Removers - Provides functionality to identify and delete specific HTML elements and their ancestors from a web page.
  • Isolated Script Worlds - Runs scripts in isolated worlds to prevent collisions between extension logic and page-level JavaScript.
  • Custom Action Bindings - Binds specific keystrokes to internal programmable functions to trigger actions without a mouse.
  • Onboarding & Welcome Tools - Triggers the automatic opening of a welcome or options page immediately after extension installation.
  • Window Management - Controls browser window properties and behaviors through a dedicated sidebar interface.
  • Clipboard Read and Write Operations - Monitors text selections on webpages and writes highlighted content to the system clipboard.
  • Native Messaging Channels - Establishes communication bridges between browser extensions and locally installed native applications.
  • Response Body Modification - Intercepts network responses from specific origins and alters the response body.
  • Network Request Interceptors - Provides capabilities to monitor and block network traffic based on defined URL patterns.
  • Session-Based Traffic Rules - Registers session-based rules to intercept and alter network traffic.
  • Request Header Overrides - Implements the overriding and removal of HTTP request headers to control browser communication.
  • Privileged API Bridges - Provides a communication bridge allowing injected scripts to access privileged browser storage and system functions.
  • Browser API Permissions - Manages declared capabilities to restrict access to sensitive browser features like history and cookies.
  • Dynamic Permission Refresh - Monitors the granting or revocation of permissions to dynamically activate extension features.
  • Domain Access Management - Checks for access to specific domains and prompts the user to grant network permissions.
  • Runtime Host Permissions - Requests specific host access from the user at runtime to avoid installation warnings.
  • Browser Toolbar Icon Controls - Provides examples for showing or hiding toolbar icons based on the state of the active tab.
  • Keyboard Shortcuts - Implements mappings that allow users to trigger extension actions using specific keyboard inputs.
  • Context Menu Customizations - Provides utilities for programmatically registering menu options that appear when right-clicking specific elements.
  • Browser Right-Click Menus - Adds specialized custom menu items to the browser's right-click menu specifically for image elements.
  • Conditional Menu Items - Implements logic to determine the visibility of specific menu items based on the current browser or application state.
  • Browser Page Replacements - Replaces the default browser new tab page with a custom HTML page.
  • Dynamic Text Formatting - Implements data-driven updates for toolbar button text to reflect real-time status.
  • Interactive Menu Items - Demonstrates adding interactive controls like checkboxes and radio buttons to browser context menus.
  • Interactive Overlay Popups - Creates temporary overlay windows that render stored information when an action button is clicked.
  • Tab Coordination - Directs users to specific URLs and controls tab behavior based on triggered events.
  • Context Menu Event Handlers - Demonstrates registering event handlers that trigger actions based on selected page elements in the context menu.
  • Search-Triggering Context Menus - Generates context menu options that trigger search queries based on text selected by the user.
  • DevTools Sidebar Integrations - Implements custom sidebars specifically for the browser inspector panel to display real-time data.
  • Theme Management - Provides a management interface for users to browse and toggle between different visual themes.
  • User Preference Settings - Implements a dedicated options page for managing user configuration and tool behavior.
  • Cloud-Synced Preferences - Saves and retrieves user-defined preferences across different devices to maintain a consistent state.
  • Keyboard Shortcut Mapping - Implements capabilities for mapping specific key combinations to trigger extension features.
  • Browser Feature Detection Utilities - Verifies availability of specific API properties at runtime to provide fallback behaviors.
  • Cross-Tab Content Search - Implements the ability to search for specific strings across multiple open tabs and highlight matching text.
  • Session Data Clearing - Provides a triggered action to remove specific types of historical browsing data, such as cookies and history.
  • Cookie Retrieval Utilities - Implements an interface to fetch and list stored cookies associated with the active browser tab.
  • Request Redirections - Implements rewriting of outgoing requests to route them to alternative destinations.
  • Network Request Interception - Intercepts, blocks, or modifies HTTP requests and responses to alter browser communication with servers.
  • Web Page Annotation Highlighters - Saves user notes and highlights to local storage and restores them automatically upon revisiting a page.
  • Sample Extensions - Contains a collection of official documentation examples.

Star history

Star history chart for mdn/webextensions-examplesStar history chart for mdn/webextensions-examples

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Webextensions Examples

Similar open-source projects, ranked by how many features they share with Webextensions Examples.
  • greasemonkey/greasemonkeygreasemonkey avatar

    greasemonkey/greasemonkey

    2,563View on GitHub↗

    Greasemonkey is a Firefox extension that functions as a JavaScript userscript engine and manager, executing custom scripts on target web pages to automate tasks and alter page functionality. It injects user code into the isolated execution context of web pages before or during page load, allowing users to modify content, behavior, and styling dynamically on specific websites. The extension integrates natively into the browser extension system using background processes and messaging interfaces. It parses special comment blocks inside scripts to determine execution permissions, URL matching pa

    JavaScript
    View on GitHub↗2,563
  • violentmonkey/violentmonkeyviolentmonkey avatar

    violentmonkey/violentmonkey

    7,874View on GitHub↗

    Violentmonkey is a userscript manager extension and JavaScript injection framework. It allows users to install and manage custom scripts and CSS to modify the behavior and appearance of websites based on metadata-driven trigger conditions. The project functions as a cloud-synced script manager, backing up and synchronizing scripts across different devices using external cloud storage services. It also serves as a cross-origin request bridge, providing a communication layer that enables scripts to bypass the same-origin policy to fetch data. The tool covers a broad range of browser automation

    JavaScriptuserscripts-supportviolentmonkeywebextensions
    View on GitHub↗7,874
  • sxei/chrome-plugin-demosxei avatar

    sxei/chrome-plugin-demo

    8,674View on GitHub↗

    《Chrome插件开发全攻略》配套完整Demo,欢迎clone体验

    JavaScript
    View on GitHub↗8,674
  • jonghakseo/chrome-extension-boilerplate-react-viteJonghakseo avatar

    Jonghakseo/chrome-extension-boilerplate-react-vite

    4,834View on GitHub↗

    This project is a boilerplate for Chrome extension development, utilizing React and Vite to build custom functionality and user interfaces for web browsers. The development workflow emphasizes fast iteration through hot-reload capabilities and module rebuilding, which reflect code changes in the browser without manual reloading. It includes a type-safe internationalization system for managing multi-language support and automated end-to-end testing to verify feature stability across different browser packages. The architecture provides a component-based framework for creating popups, options

    TypeScript
    View on GitHub↗4,834
See all 30 alternatives to Webextensions Examples→

Frequently asked questions

What does mdn/webextensions-examples do?

This project is a reference library and collection of practical code samples for building browser extensions using WebExtensions APIs. It provides implementation guides and functional examples for core extension components, including content scripts, background processes, and browser action popups.

What are the main features of mdn/webextensions-examples?

The main features of mdn/webextensions-examples are: WebExtensions API Development, Local Data Stores, Browser Storage Persistence, In-Page Script Execution, Inter-Component Messaging, Code Examples, Inter-Process Communication, WebExtensions Implementation Guides.

What are some open-source alternatives to mdn/webextensions-examples?

Open-source alternatives to mdn/webextensions-examples include: greasemonkey/greasemonkey — Greasemonkey is a Firefox extension that functions as a JavaScript userscript engine and manager, executing custom… violentmonkey/violentmonkey — Violentmonkey is a userscript manager extension and JavaScript injection framework. It allows users to install and… sxei/chrome-plugin-demo — 《Chrome插件开发全攻略》配套完整Demo,欢迎clone体验. jonghakseo/chrome-extension-boilerplate-react-vite — This project is a boilerplate for Chrome extension development, utilizing React and Vite to build custom functionality… scriptscat/scriptcat — Scriptcat is a user script manager and browser extension designed to install, execute, and manage custom JavaScript… mozilla-firefox/firefox — Firefox is a cross-platform web browser engine designed to render web content, execute JavaScript, and manage secure…