Skip to content

WebExtension module: Track `activeTab` permission; automatically inject content scripts

License

Notifications You must be signed in to change notification settings

fregante/webext-active-tab

Repository files navigation

webext-active-tab npm version

WebExtension module: Track activeTab permission; automatically inject content scripts

The main use case is to ship your extension without host_permissions and have the user invoke the extension on click on any website.

Alternatively, consider using webext-permission-toggle and webext-dynamic-content-scripts to permanently receive access to certain hosts and automatically register content scripts on it.

Install

npm install webext-active-tab

Usage

This package exports various utilities, just import what you need.

Note

Firefox has some limitations:

  • activeTab seems to be lost after a reload
  • further contextMenu clicks receive a moz-extension URL rather than the current page’s URL

Related

License

MIT © Federico Brigante

About

WebExtension module: Track `activeTab` permission; automatically inject content scripts

Resources

License

Stars

Watchers

Forks

Packages

No packages published