Convert Figma logo to code with AI

fregante logoAwesome-WebExtensions

A curated list of awesome resources for WebExtensions development.

1,307
86
1,307
0

Top Related Projects

Example Firefox add-ons created using the WebExtensions API

🖥🔋Web Extension starter to build "Write Once Run on Any Browser" extension

A lightweight polyfill library for Promise-based WebExtension APIs in Chrome

Chrome Extensions Samples

🛠️ A Vue CLI 3+ preset (previously a Vue CLI 2 boilerplate) for quickly starting a web extension with Vue, Babel, ESLint and more!

Quick Overview

Awesome-WebExtensions is a curated list of resources, tools, and libraries for developing browser extensions. It serves as a comprehensive guide for developers working on cross-browser extensions, providing links to documentation, APIs, and useful tools to streamline the development process.

Pros

  • Extensive collection of resources for browser extension development
  • Regularly updated with new tools and libraries
  • Well-organized and categorized for easy navigation
  • Covers multiple browsers, including Chrome, Firefox, and Safari

Cons

  • May be overwhelming for beginners due to the large amount of information
  • Some listed resources might become outdated over time
  • Lacks detailed explanations or tutorials for each resource
  • Primarily focuses on links rather than providing in-depth content

Note: As this is not a code library, the code examples and getting started instructions sections have been omitted.

Competitor Comparisons

Example Firefox add-ons created using the WebExtensions API

Pros of webextensions-examples

  • Provides complete, working examples of various WebExtension features
  • Maintained by Mozilla Developer Network (MDN), ensuring high-quality and up-to-date content
  • Includes detailed comments and explanations within the code

Cons of webextensions-examples

  • Limited to a specific set of examples, not covering all possible WebExtension use cases
  • Focuses on individual features rather than providing a comprehensive list of resources
  • May not include the latest experimental or cutting-edge WebExtension capabilities

Code Comparison

webextensions-examples:

browser.browserAction.onClicked.addListener(() => {
  browser.tabs.create({
    url: "https://example.com"
  });
});

Awesome-WebExtensions:

## Getting Started

- [Chrome Extensions documentation](https://developer.chrome.com/extensions)
- [Mozilla's WebExtensions documentation](https://developer.mozilla.org/en-US/Add-ons/WebExtensions)

The webextensions-examples repository provides actual code snippets and complete examples, while Awesome-WebExtensions offers a curated list of resources and links to documentation.

🖥🔋Web Extension starter to build "Write Once Run on Any Browser" extension

Pros of web-extension-starter

  • Provides a ready-to-use boilerplate for web extension development
  • Includes TypeScript support out of the box
  • Offers a pre-configured build system with webpack

Cons of web-extension-starter

  • Limited to a specific tech stack, which may not suit all developers
  • Requires more setup and understanding of the project structure
  • Less comprehensive in terms of resources and examples compared to Awesome-WebExtensions

Code Comparison

web-extension-starter provides a structured project setup:

// source/Background/index.ts
import reloadOnUpdate from 'virtual:reload-on-update-in-background-script';

reloadOnUpdate('pages/background');

console.log('background script loaded');

Awesome-WebExtensions, being a curated list, doesn't provide direct code examples but offers links to various resources and tools:

## Boilerplates
- [browser-extension-template](https://github.com/notlmn/browser-extension-template) - Barebones boilerplate with webpack, options handler and auto-publishing.
- [create-browser-extension](https://github.com/dutiyesh/create-browser-extension) - WebExtension starter kit - Create modern cross-browser extensions with no build configuration.

While web-extension-starter offers a complete development environment, Awesome-WebExtensions provides a comprehensive list of resources, tools, and examples for web extension development. The choice between them depends on whether you need a ready-to-use boilerplate or a collection of resources to build your own setup.

A lightweight polyfill library for Promise-based WebExtension APIs in Chrome

Pros of webextension-polyfill

  • Provides a standardized Promise-based API for cross-browser extension development
  • Maintained by Mozilla, ensuring compatibility with Firefox and other browsers
  • Simplifies asynchronous operations in extension development

Cons of webextension-polyfill

  • Limited to API polyfills, not a comprehensive resource for extension development
  • May introduce a small performance overhead due to Promise wrapping
  • Requires additional setup and inclusion in extension projects

Code Comparison

webextension-polyfill:

browser.tabs.query({active: true, currentWindow: true}).then(tabs => {
  console.log(tabs[0].url);
});

Awesome-WebExtensions (example from a linked resource):

chrome.tabs.query({active: true, currentWindow: true}, tabs => {
  console.log(tabs[0].url);
});

Summary

Awesome-WebExtensions is a curated list of resources for browser extension development, offering a wide range of tools, libraries, and guides. It serves as a comprehensive reference for developers but doesn't provide direct functionality.

webextension-polyfill, on the other hand, is a specific tool that provides a unified API for cross-browser extension development. It offers a more consistent development experience but is focused solely on API compatibility rather than being a general resource.

Developers may find value in using both: Awesome-WebExtensions for discovering resources and webextension-polyfill for simplifying cross-browser development.

Chrome Extensions Samples

Pros of chrome-extensions-samples

  • Official Google repository with up-to-date examples
  • Comprehensive collection of samples covering various Chrome extension APIs
  • Well-documented code with comments explaining functionality

Cons of chrome-extensions-samples

  • Focused solely on Chrome extensions, lacking cross-browser compatibility
  • May not include community-contributed resources or third-party tools
  • Limited to code samples, without curated lists of external resources

Code Comparison

Awesome-WebExtensions typically doesn't include code samples directly, but rather links to resources. chrome-extensions-samples provides full code examples:

// chrome-extensions-samples (example from messaging sample)
chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
  if (message.action === 'getCount') {
    sendResponse({ count: count });
  }
});

Awesome-WebExtensions might link to similar resources or documentation, but doesn't host code directly.

Summary

chrome-extensions-samples offers official, well-documented Chrome extension examples, ideal for developers focusing on Chrome. Awesome-WebExtensions provides a broader, community-curated list of resources for cross-browser extension development, including tools, libraries, and tutorials. The choice between them depends on whether you're specifically targeting Chrome or aiming for cross-browser compatibility.

🛠️ A Vue CLI 3+ preset (previously a Vue CLI 2 boilerplate) for quickly starting a web extension with Vue, Babel, ESLint and more!

Pros of vue-web-extension

  • Focused specifically on Vue.js for building web extensions
  • Provides a complete boilerplate and build setup for Vue-based extensions
  • Includes hot-reloading for faster development

Cons of vue-web-extension

  • Limited to Vue.js framework, less flexible for other technologies
  • Smaller community and fewer resources compared to Awesome-WebExtensions
  • May require more setup and configuration for complex extensions

Code Comparison

vue-web-extension:

import Vue from 'vue'
import App from './App.vue'

new Vue({
  el: '#app',
  render: h => h(App)
})

Awesome-WebExtensions (generic example):

document.addEventListener('DOMContentLoaded', () => {
  const app = document.getElementById('app')
  app.textContent = 'Hello, Web Extension!'
})

Summary

vue-web-extension is a specialized boilerplate for building Vue.js-based web extensions, offering a streamlined development experience with hot-reloading and a complete setup. However, it's limited to the Vue.js ecosystem and may have a smaller community.

Awesome-WebExtensions, on the other hand, is a comprehensive resource list covering various aspects of web extension development across different browsers and technologies. It provides a wider range of tools, libraries, and examples but doesn't offer a specific boilerplate or framework.

Choose vue-web-extension if you're committed to using Vue.js for your extension. Opt for Awesome-WebExtensions if you need a broader set of resources or want to explore different technologies for extension development.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Awesome WebExtensions Awesome

A curated list of awesome resources for WebExtensions development.

WebExtensions are a cross-browser system for developing browser add-ons. To a large extent the system is compatible with the extension API supported by Google Chrome. Extensions written for this browser will in most cases run in Firefox with just a few changes.

Follow @fregante for more webext-related news.

Contents

Getting started

Community

Libraries and Frameworks

Code meant become part of the extension.

Tools

Apps that help you manage your extensions.

  • Chrome Webstore Upload - Upload the extension to the Chrome Web Store via cli (or on Travis, automatically).
  • mozilla/web-ext - Command line tool to help build, run, and test WebExtensions.
  • chromepet - Get notified when your new version has been published.
  • chrome-ext-downloader - Download any extension on Chrome Web Store to see how they do it.
  • chrome-store-api - Chrome Web Store API wrapper.
  • Chrome extension source viewer - WebExtension to view source code of extensions directly on the store.
  • @wext/shipit - Tool to automatically publish to Chrome Web Store, Mozilla Addons and Opera Addons.
  • wext-manifest-loader - Webpack loader that lets you specify manifest.json properties to appear only in specific browsers.
  • webextension-manifest-loader - Webpack loader that loads browser tailored manifest.json. It also imports all importable properties, allowing you to have 'manifest.json' as your only webpack entry point.
  • webpack-extension-reloader - A Webpack plugin to automatically reload browser extensions during development.
  • webpack-target-webextension - Adds code-splitting support to WebExtensions build with Webpack.
  • Extension.js - Plug-and-play, zero-config, cross-browser extension development tool.

Testing

Boilerplates

Sample Extensions

These are simple and modern WebExtensions repositories that could help you figure out where pieces go, including automatic deployment via Travis CI.