AmazingDayToday
AmazingDayToday

Reputation: 4272

Chrome Extension: content_scripts - matches - contains

I looked at match patterns documentation, but can't find a way to have matches to contain a text.

E.g. how to make it work only for links that contains test/22?

Tried:

"content_scripts": [
    {
        "matches": ["https://*/test/22*"]
    }
}

and many others, no luck.

Upvotes: 0

Views: 223

Answers (1)

woxxom
woxxom

Reputation: 73526

Each section of the url match should be defined (scheme, host, path), you may use * for the parts that may contain any value:

"https://*/*test/22*"
         ^ ^
      host |
           path starts here

Upvotes: 1

Related Questions