0

I want to reference a text file (in this case sites.txt), instead of having it inside the manifest file, so I can easily edit it. As well as save on file size. Is this possible? I have seen people have extensions that have a whitelist that users can change.

Manifest.json file and others at https://github.com/zekrom-vale/Skip-adf.ly

The example would be:

`{
...
  "content_scripts": [{
    "matches": sites.txt,
      "js": ["skip.js"]
    }]
}`

Where sites.txt is

"http://adf.ly/*","http://atominik.com/*",...

The problem is if the file is "sites.txt" I believe it will just run on sites.txt (or get an error) and not get the pages to run on.

Thank you for a response!

Zekrom_Vale
  • 344
  • 4
  • 10
  • Also I want to do this with permissions too. – Zekrom_Vale May 19 '17 at 16:06
  • 2
    No, it's not possible. Those extensions simply inject the content script on matching sites or use a dumb location.href check in a content script that runs on all pages. As for permissions, read the documentation for optional permissions. – wOxxOm May 19 '17 at 16:06
  • Well, that does make sense as permissions is listed before you install the extension and would cause security issues. – Zekrom_Vale May 19 '17 at 16:10
  • 1
    If you'll choose the selective injection method, consider using [declarativeContent's RequestContentScript](https://developer.chrome.com/extensions/declarativeContent) (ignore the warning message). – wOxxOm May 19 '17 at 16:14

0 Answers0