Skip to content

platform/blocker/blocker-types

Defined in: app/src/platform/blocker/blocker-types.ts:42

Options of the content blocker.

readonly dataDir: string

Defined in: app/src/platform/blocker/blocker-types.ts:44

Folder with engine.bin, built by tools/blocker/build.ts.

readonly enabled: (pageUrl) => boolean

Defined in: app/src/platform/blocker/blocker-types.ts:46

Whether blocking is on for a page, by its address; read for every request.

string

boolean

readonly optional extras?: () => readonly ExtraLists[]

Defined in: app/src/platform/blocker/blocker-types.ts:52

The groups of optional lists that are on; read for every request and frame.

readonly ExtraLists[]

readonly logger: Logger

Defined in: app/src/platform/blocker/blocker-types.ts:53

readonly optional onBlocked?: (webContentsId) => void

Defined in: app/src/platform/blocker/blocker-types.ts:48

Called for every blocked request, with the id of the tab’s web contents.

number

void

readonly optional onStatus?: (status) => void

Defined in: app/src/platform/blocker/blocker-types.ts:50

Called when the status of the content blocker changes.

BlockerStatus

void


Defined in: app/src/platform/blocker/blocker-types.ts:7

A procedural rule, such as :has-text(): the frame finds its elements itself, then marks them with the attribute that the style sheet hides, or runs the directive on them.

readonly ast: unknown

Defined in: app/src/platform/blocker/blocker-types.ts:9

The selector of the elements, parsed.

readonly optional attribute?: string

Defined in: app/src/platform/blocker/blocker-types.ts:11

The attribute that hides an element, for hiding rules.

readonly optional directive?: unknown

Defined in: app/src/platform/blocker/blocker-types.ts:13

What to do with an element, such as removing it, for the other rules.


Defined in: app/src/platform/blocker/blocker-types.ts:29

The classes, ids and link targets that a frame reported.

readonly classes: readonly string[]

Defined in: app/src/platform/blocker/blocker-types.ts:30

readonly hrefs: readonly string[]

Defined in: app/src/platform/blocker/blocker-types.ts:32

readonly ids: readonly string[]

Defined in: app/src/platform/blocker/blocker-types.ts:31


Defined in: app/src/platform/blocker/blocker-types.ts:17

The rules for a frame that starts.

readonly elements: boolean

Defined in: app/src/platform/blocker/blocker-types.ts:25

Whether the frame should report its elements for the generic hiding rules.

readonly extended: readonly ExtendedRule[]

Defined in: app/src/platform/blocker/blocker-types.ts:23

Procedural rules of the frame’s address.

readonly scripts: readonly string[]

Defined in: app/src/platform/blocker/blocker-types.ts:21

Scriptlets that run in the page’s world before its own scripts.

readonly styles: string

Defined in: app/src/platform/blocker/blocker-types.ts:19

Element hiding rules of the frame’s address, as a style sheet.

BlockerStatus = "idle" | "loading" | "ready" | "failed"

Defined in: app/src/platform/blocker/blocker-types.ts:36

Where the content blocker is: not loaded yet, loading, working, or without usable data.


ExtraLists = "cookies" | "annoyances"

Defined in: app/src/platform/blocker/blocker-types.ts:39

A group of optional lists with an engine of its own: cookie notices or annoyances.