-
-
Notifications
You must be signed in to change notification settings - Fork 13
Add optional support for activeTab injection
#44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
CI fixed by #48 😮💨 |
active-tab.ts
Outdated
| export function onActiveTab(callback: (tab: ActiveTab) => void) { | ||
| startActiveTabTracking(); | ||
| emitter.add(callback); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is ready to be exported to a separate module, likely webext-events
including-active-tab.ts
Outdated
| } | ||
| } | ||
|
|
||
| onActiveTab(injectToTab); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manually tested:
- via context menu
- via browser action
Broken:
- registered top frame, unregistered inner frame: no op ❌
Edit: cross-origin iframes aren't covered by activeTab
Parcel keeps the files only in the dist/mv2 directly, generating invalid paths in the manifest.json
isContentScriptRegistered#36Missing
activeTabsupport inisContentScriptRegisteredor similar,isContentScriptRegistered(url, tabId?) //=> activeTab still returns dynamicpossiblyActiveTabs.has(tabId)https-only injection logicDeal with
activeTabreload injections