fregante / fregante/webext-active-tab
`registerActiveTabScripts` - allow filtering out some tabs
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
To restore some functionality from https://github.com/fregante/webext-dynamic-content-scripts/pull/78
Static
```diff
import registerActiveTabScripts from 'webext-active-tab/register-active-tab-scripts';
+ import {isContentScriptRegistered} from 'webext-dynamic-content-scripts/utils.js';
registerActiveTabScripts({
+ filter: async tab => !isContentScriptRegistered(tab.url),
js: [
'content.js',
],
css: [
'content.css',
],
runAt: 'document_idle',
matchAboutBlank: false,
});
```
Contributor guide
Research direction
Start at the register-active-tab-scripts entry point shown in the issue and inspect how its options are handled. Add support for the proposed asynchronous filter option so matching tabs can be skipped, then verify that the example using isContentScriptRegistered behaves as intended; no test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100