Documentation
¶
Overview ¶
Package contentrules matches loads against rules in WebKit's content blocker format, for the backends whose engine has no content blockers (WebView2). Only the backends' content rules reach it, so that apps that never compile rules don't link it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HidingScript ¶
HidingScript returns JavaScript that hides, in a document of a page applying the lists, the elements their css-display-none rules select for its URL, or "" when the lists hide nothing. Each selector gets a style rule of its own, so that one the engine does not take leaves the others be.
Types ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
List is a list of rules, parsed. Match it from one goroutine at a time: it compiles the rules' regular expressions as it first needs them.
type Request ¶
type Request struct {
// URL is what loads, TopURL the page it loads for, the URL itself
// for a page.
URL, TopURL string
// Type is what kind of resource it is: a type or several, any of
// which a rule's resource-type may name.
Type Type
}
Request is a load to match.