
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
electron-ad-block
Advanced tools
Simple ad blocker for Electron.
The library is powered by Brave Ad Block.
The core code is modified from Jense5/electron-ad-blocker & Jense5/is-ad.
But it works out of the box - automatically downloads EasyList filter lists and updates them in background.
const { session } = require('electron');
const adBlock = require('electron-ad-block');
const currentSession = session.fromPartition('current');
adBlock(currentSession, {
filterTypes: ['ads', 'privacy', 'annoyance', 'social'],
});
or
const { BrowserWindow } = require('electron')
const adBlock = require('electron-ad-block');
const win = new BrowserWindow();
adBlock(win.webContents.session, {
filterTypes: ['ads', 'privacy', 'annoyance', 'social'],
});
Default: ['ads', 'privacy', 'annoyance', 'social']
Define what content types you want to block.
Default: console
Optional logger that will be used. Uses the .log function as in console.log(). If you want to use winston
, make sure to wrap it: { logger: { log: (...params) => winston.info(...params) } }
.
Default: undefined
Optional function that will be called instead of the callback. This is useful if you still want to define your own onRequest function for the electron session. An extra parameter is added, which is shouldBeBlocked.
Default: true
Whether or not the Ad Blocker should log when he blocks a request.
FAQs
Simple ad blocker for Electron.
We found that electron-ad-block demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.