@cliqz/autoconsent
Version:
This is a library of rules for navigating through common consent popups on the web. These rules can be run in a Firefox webextension, or in a puppeteer orchestrated headless browser. Using these rules, opt-in and opt-out options can be selected automatica
54 lines (45 loc) • 817 B
TypeScript
export type ContentScriptMessage =
| ClickMessage
| ElemExistsMessage
| ElemVisibleMessage
| GetAttributeMessage
| EvalMessage
| HideMessage
| MatchesMessage
| ActionMessage;
type ClickMessage = {
type: "click";
selector: string;
all?: boolean;
};
type ElemExistsMessage = {
type: "elemExists";
selector: string;
};
type ElemVisibleMessage = {
type: "elemVisible";
selector: string;
check?: "any" | "none" | "all";
};
type GetAttributeMessage = {
type: "getAttribute";
selector: string;
attribute: string;
};
type EvalMessage = {
type: "eval";
script: string;
};
type HideMessage = {
type: "hide";
selectors: string[];
};
type MatchesMessage = {
type: "matches";
config: any;
};
type ActionMessage = {
type: "executeAction";
config: any;
param: any;
};