fregante/webext-active-tab

`registerActiveTabScripts` - allow filtering out some tabs

开放

#3 创建于 2025年2月1日

 (0 条评论) (0 个反应) (0 位负责人)TypeScript (0 个派生)github user discovery
enhancementhelp wanted

仓库指标

星标
 (2 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

To restore some functionality from https://github.com/fregante/webext-dynamic-content-scripts/pull/78

Static

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,
});

贡献者指南