Gathering detailed insights and metrics for webext-content-script-ping
Gathering detailed insights and metrics for webext-content-script-ping
Gathering detailed insights and metrics for webext-content-script-ping
Gathering detailed insights and metrics for webext-content-script-ping
One-file interface to detect whether your content script have loaded.
npm install webext-content-script-ping
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
9 Stars
19 Commits
2 Watchers
2 Branches
1 Contributors
Updated on Jul 14, 2024
Latest Version
2.0.1
Package Id
webext-content-script-ping@2.0.1
Size
1.59 kB
NPM Version
5.5.1
Node Version
8.6.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
One-file interface to detect whether your content script have loaded.
1npm install --save webext-content-script-ping
1import {pingContentScript} from 'webext-content-script-ping';
From background.js
, ping a tab id:
1/* globals pingContentScript */ 2pingContentScript(tabId).then(() => { 3 // the content script was loaded! 4}, () => { 5 // the content script was NOT loaded! 6});
In your manifest.json
, include the file as background and as content script:
1{ 2 "background": { 3 "scripts": [ 4 "webext-content-script-ping.js" 5 ] 6 }, 7 "content_scripts": [ 8 { 9 "js": [ 10 "webext-content-script-ping.js", 11 "content.js" 12 ] 13 } 14 ] 15}
In your background script only, run pingContentScript(tabId)
as needed
1// background.js 2import pingContentScript from 'webext-content-script-ping'; 3pingContentScript(tabId);
1// content.js 2import 'webext-content-script-ping'; // this only responds to the ping
Returns a Promise that succeeds if the content was loaded, fails if it wasn't.
It has an internal timeout of 300ms.
Type: Tab
or number
A Tab
object or just its id
as defined here: https://developer.chrome.com/extensions/tabs#type-Tab
webext-options-sync
: Helps you manage and autosave your extension's options.webext-inject-on-install
: Automatically add content scripts to existing tabs when your extension is installed.Awesome WebExtensions
: A curated list of awesome resources for Web Extensions development.MIT © Federico Brigante — Twitter
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/19 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More