Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.
/ extensionizer Public archive

A JS module for writing cross-browser extensions

License

Notifications You must be signed in to change notification settings

MetaMask/extensionizer

Repository files navigation

Extensionizer [DEPRECATED]

Deprecation notice

This package has been deprecated in favor of webextension-polyfill. We will not be maintaining this package anymore. Please consider migrating to webextension-polyfill.

A module for writing cross-browser extensions

Most browsers (other than Safari) have implemented the WebExtensions API for writing browser extensions.

Unfortunately, they've often hidden that common API under a variety of differently named global objects.

When you import extensionizer, it grabs those WebExtension APIs from wherever they're hiding, and hangs them all on a singleton object that it returns to you.

Just use extensionizer instead of the browser specific extension prefixing.

Sample Usage

First install with yarn install extensionizer.

const extension = require('extensionizer')

// Ever notice you can't use normal hyperlinks in an extension?
// Now it's easy:
extension.tabs.create({url: 'mailto:help@metamask.io?subject=Feedback'})

const manifest = extension.runtime.getManifest()

For the full list of supported methods, refer to the MDN API documentation.

Running Tests

Run yarn test after running yarn.

About

A JS module for writing cross-browser extensions

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published