I'm writing a coupon style chrome extension and i want it to run only on specific websites (over 300 sites). I've read about specifying the sites url in content_scripts but that doesn't seem practical especially if i needed to update it. Here is my script:
Manifest.json
{ "name": "Example", "description": "description", "version": "1.0", "manifest_version": 2, "background": { "scripts": ["js/background.js", "js/eventPage.js", "js/jquery- 3.2.1.min.js"], "persistent":false }, "page_action": { "default_icon":"img/32icon.png" }, "content_scripts": [ { "matches": ["https://*/*"], "js": ["js/sites_cs.js", "js/jquery-3.2.1.min.js"] } ], "permissions": [ "tabs", "http://*/*", "https://*/*", "activeTab" ] }
matches:option, how do you want to decide whether to run it?matches:. If the list changes, update the list. I don't see any other option."matches": ["https://*/*"]in there content_scripts. so there must be a way to do it in the js fileswindow.location