@duckduckgo/content-scope-scripts
    Preparing search index...

    The text-shaping knobs every selector-based field shares: where the value lives and how to clean the text once read. This is the spec for the majority of fields (name, age, phone, …); city/state and profileUrl extend it (see CityStateSpec, ProfileUrlSpec). For example: { "selector": ".//div[@class='relatives']//li" }

    interface TextFieldSpec {
        afterText?: string;
        attribute?: string;
        beforeText?: string;
        findElements?: boolean;
        selector?: string;
        separator?: string;
    }
    Index

    Properties

    afterText?: string

    get all text after this string

    attribute?: string

    read this attribute (e.g. "data-profile-id") instead of the element's text. The raw attribute value is used (e.g. "href" is not resolved to an absolute URL)

    beforeText?: string

    get all text before this string

    findElements?: boolean

    whether to get all occurrences of the selector

    selector?: string

    xpath or css selector

    separator?: string

    split the text on this string, or use a regex by passing "/pattern/" (e.g. "/(?<=, [A-Z]{2}), /")