webext-content-scripts
Advanced tools
+3
-0
@@ -22,2 +22,5 @@ import type { ContentScript, ExtensionFileOrCode, RunAt } from './types.js'; | ||
| export declare function executeScript({ tabId, frameId, files, allFrames, matchAboutBlank, runAt, }: InjectionDetails, { ignoreTargetErrors }?: InjectionOptions): Promise<void>; | ||
| /** | ||
| * @deprecated Use `webext-tools` instead: import queryTabsByUrl from 'webext-tools/query-tabs-by-url.js'; | ||
| */ | ||
| export declare function getTabsByUrl(matches: string[], excludeMatches?: string[]): Promise<number[]>; | ||
@@ -24,0 +27,0 @@ export declare function injectContentScript(where: MaybeArray<number | Target>, scripts: MaybeArray<ContentScript>, options?: InjectionOptions): Promise<void>; |
+3
-0
@@ -149,2 +149,5 @@ import chromeP from 'webext-polyfill-kinda'; | ||
| } | ||
| /** | ||
| * @deprecated Use `webext-tools` instead: import queryTabsByUrl from 'webext-tools/query-tabs-by-url.js'; | ||
| */ | ||
| export async function getTabsByUrl(matches, excludeMatches) { | ||
@@ -151,0 +154,0 @@ if (matches.length === 0) { |
+1
-1
| { | ||
| "name": "webext-content-scripts", | ||
| "version": "2.7.2", | ||
| "version": "2.7.3", | ||
| "description": "Utility functions to inject content scripts in WebExtensions, for Manifest v2 and v3", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+3
-2
@@ -99,4 +99,5 @@ # webext-content-scripts [](https://www.npmjs.com/package/webext-content-scripts) | ||
| // You can also use the exported `getTabsByUrl` utility to inject by URL as well | ||
| injectContentScript(await getTabsByUrl(['https://example.com/*']), scripts); | ||
| // You can also use `webext-tools` to inject by URL as well | ||
| import queryTabsByUrl from 'webext-tools/query-tabs-by-url.js'; | ||
| injectContentScript(await queryTabsByUrl(['https://example.com/*']), scripts); | ||
| ``` | ||
@@ -103,0 +104,0 @@ |
20327
1.37%311
1.97%250
0.4%