🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

webext-content-scripts

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webext-content-scripts - npm Package Compare versions

Comparing version
2.7.2
to
2.7.3
+3
-0
index.d.ts

@@ -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>;

@@ -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": [

@@ -99,4 +99,5 @@ # webext-content-scripts [![npm version](https://img.shields.io/npm/v/webext-content-scripts.svg)](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 @@