Is there a way to limit a Chrome extension to only run on certain urls?
Say I want the extension to run only if the domain is Amazon.com. I realize you can put a che
As a user, with Chrome 71 (or maybe even before) with chrome://flags/#extension-active-script-permission (you may need to enable User consent for extension scripts flag) allows you to right click extension icons and select "This can read and change site data" then you can choose:
This way you can limit an extension to only run on certain domains very quickly.
There's a Chrome extension for this: Extension Automation. I had gone the route of modifying manifests before, but this is easier.
Welp, it figures I would find the answer to this right after posting the question, even though I have been stuck for a while...
http://code.google.com/chrome/extensions/content_scripts.html
In manifest.json:
"content_scripts": [
{
"matches": [...urls...],
"exclude_matches": [...urls...],
"css": [...]
}
]