Skip to content

Automatically listen to activetab (optionally?) #41

@fregante

Description

@fregante

In some cases (most?) you'd also want the content script to be automatically available on the activeTab as well. This would avoid conflicting scripts trying to inject the script via different code paths:

ActiveTab-tracking code can be found here and will likely be extracted, maybe into webext-tools:

On top of that, I think it also needs to listen to tabs and manually inject the scripts instead of relying on registerContentScripts. However it seems that the API supports activeTab in MV3: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/registerContentScripts


To preserve the side-effects-only nature of the module, I think it can export an additional entry point:

import 'webext-dynamic-content-scripts/including-activetab';

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions