
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@cliqz/adblocker-webextension
Advanced tools
Efficient
· Minimal
· JavaScript
· TypeScript
· uBlock Origin- and Easylist-compatible
Node.js
· Puppeteer
· Electron
· WebExtension
Install: npm install --save @cliqz/adblocker-webextension
.
For a complete example check-out: @cliqz/adblocker-webextension-example.
Creating an instance of WebExtensionBlocker
and start blocking ads!
From the background page of your extension:
import { WebExtensionBlocker } from '@cliqz/adblocker-webextension';
WebExtensionBlocker.fromPrebuiltAdsAndTracking().then((blocker) => {
blocker.enableBlockingInBrowser(browser);
});
On Chromium-based browsers you will need a polyfill such as
webextension-polyfill
to get this working:
import { browser } from 'webextension-polyfill';
import { WebExtensionBlocker } from '@cliqz/adblocker-webextension';
WebExtensionBlocker.fromPrebuiltAdsAndTracking().then((blocker) => {
blocker.enableBlockingInBrowser(browser);
});
You are ready to block ads!
There are other ways you can create an instance of the blocking engine to start blocking ads.
If you already have filters locally:
import { WebExtensionBlocker } from '@cliqz/adblocker-webextension';
const blocker = WebExtensionBlocker.parse(fs.readFileSync('easylist.txt', 'utf-8'));
Fetching lists from URLs:
import { WebExtensionBlocker } from '@cliqz/adblocker-webextension';
const blocker = await WebExtensionBlocker.fromLists(fetch, [
'https://easylist.to/easylist/easylist.txt'
]);
Use ready-made configs to block ads and optionally trackers:
import { WebExtensionBlocker } from '@cliqz/adblocker-webextension';
let blocker = await WebExtensionBlocker.fromPrebuiltAdsOnly(); // ads only
blocker = await WebExtensionBlocker.fromPrebuiltAdsAndTracking(); // ads and tracking
To stop blocking ads:
blocker.disableBlockingInBrowser();
To avoid having to create the same instance of WebExtensionBlocker
all over again,
you can serialize it to a byte-array which you can store on disk for faster
loading.
import { WebExtensionBlocker } from '@cliqz/adblocker-webextension';
WebExtensionBlocker.fromPrebuiltAdsAndTracking().then((blocker) => {
const buffer = blocker.serialize();
const restoredBlocker = WebExtensionBlocker.deserialize(buffer);
// `restoredBlocker` is deep-equal to `blocker`!
});
v1.34.0 (Wed Oct 16 2024)
@ghostery/adblocker
master
@ghostery/adblocker
$replace
testing material #4302 (@seia-soto)@ghostery/adblocker-puppeteer
@ghostery/adblocker-webextension
@ghostery/adblocker-electron-preload
, @ghostery/adblocker-electron
@ghostery/adblocker-electron-preload
, @ghostery/adblocker-webextension-cosmetics
, @ghostery/adblocker
@ghostery/adblocker-puppeteer
@ghostery/adblocker-electron
, @ghostery/adblocker-extended-selectors
, @ghostery/adblocker-playwright
, @ghostery/adblocker-puppeteer
, @ghostery/adblocker-webextension-cosmetics
, @ghostery/adblocker-webextension
, @ghostery/adblocker
@ghostery/adblocker-electron-preload
@ghostery/adblocker-webextension-cosmetics
@ghostery/adblocker
FAQs
Ghostery adblocker WebExtension wrapper
The npm package @cliqz/adblocker-webextension receives a total of 36 weekly downloads. As such, @cliqz/adblocker-webextension popularity was classified as not popular.
We found that @cliqz/adblocker-webextension demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.