Skip to content

platform/blocker/resource-protocol

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

A replacement resource; the body is Base64 when the content type ends in ;base64.

readonly body: string

Defined in: app/src/platform/blocker/resource-protocol.ts:12

readonly contentType: string

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

const resourceScheme: "astela-resource" = 'astela-resource'

Defined in: app/src/platform/blocker/resource-protocol.ts:8

The scheme of the replacement resources that $redirect filters serve. A script that is redirected to a data: address does not run in Chromium, so the resources come from a privileged scheme of their own, on web sessions only.

resourceUrl(name): string

Defined in: app/src/platform/blocker/resource-protocol.ts:27

The address under which a resource is served.

string

The resource’s file name.

string


serveResources(session, lookup): void

Defined in: app/src/platform/blocker/resource-protocol.ts:37

Serves the replacement resources on a web session. Every page may load them, because a redirected request keeps the origin of the page that made it.

Session

A session of web content.

(name) => ReplacementResource | undefined

Finds a resource by its file name; undefined if there is none.

void