webext-active-tab

0.10.0 • Public • Published

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

Package Sidebar

Install

npm i webext-active-tab

Weekly Downloads

1

Version

0.10.0

License

MIT

Unpacked Size

19.3 kB

Total Files

15

Last publish

Collaborators

  • fregante