0
votes

I found this very useful answer for my question but it is not working for me: Can an app or extension open files on system with permission "<all_urls>"?

Here is a part of my manifest.json:

...
  "content_scripts": [
    {
      "matches": [<all_urls>], // tried also "file:///*"
...
"permissions": [
    "activeTab",
    "background",
    "tabs",
    "<all_urls>"
  ],
...

And also I got my "Allow access to file URLs" box checked in the extensnions:// tab.

Still, the Content script tab in the Developer tools is empty when I open a local html file:///

Extension is loaded for http:// urls, no probs.

Anybody has any idea if there is something more or am I missing something?

1
<all_urls> in matches should be in quotes. But I assume you've actually done that and it's just a copy/paste error here, because Chrome would complain if you had that in your manifest.Teepeemm
It should load with "<all_urls>" + that checkbox unless you indeed have the above typo.wOxxOm

1 Answers

0
votes

@Teepeemm and @wOxxOm you are right to point the missing quotes. My JSON is weak.

But interestingly Chrome didn't complain when reloading the extension until I restarted Chrome. Also it seems it kept the old version loaded and this fooled me that is working. So even Chrome needs to be restarted sometimes to work properly :)

PS. I did try a few different patterns, so yes I clicked the reload button many times. But I notice there is a few seconds lag of the reloading - I use Browserify and my background.js is 580 000 lines.