Hello,
Is it possible to "Allow access to file URLs" on a Web Extension?
I'm trying to convert an existing extension to Safari 14 and so far it's working great but I cannot figure out how to enable the extension on file:// URLs.
I've disabled "Local File Restrictions" from the "Develop" menu but the content script is still not loaded on a file:// URLs.
In my manifest.json, I've declared:
"content_scripts": [
{
"matches": [
"*://*/*.ad",
"*://*/*.ad?*",
"*://*/*.ad.*",
"*://*/*.adoc",
"*://*/*.adoc?*",
"*://*/*.adoc.*",
"*://*/*.asc",
"*://*/*.asc?*",
"*://*/*.asc.*",
"*://*/*.asciidoc",
"*://*/*.asciidoc?*",
"*://*/*.asciidoc.*",
"*://*/*.txt",
"*://*/*.txt?*",
"*://*/*.txt.*",
"file://*/*.ad",
"file://*/*.ad?*",
"file://*/*.ad.*",
"file://*/*.adoc",
"file://*/*.adoc?*",
"file://*/*.adoc.*",
"file://*/*.asc",
"file://*/*.asc?*",
"file://*/*.asc.*",
"file://*/*.asciidoc",
"file://*/*.asciidoc?*",
"file://*/*.asciidoc.*",
"file://*/*.txt",
"file://*/*.txt?*",
"file://*/*.txt.*"
],
With the following permissions:
"permissions": [
"storage",
"tabs",
"activeTab",
"*://*/*.ad",
"*://*/*.ad?*",
"*://*/*.ad.*",
"*://*/*.adoc",
"*://*/*.adoc?*",
"*://*/*.adoc.*",
"*://*/*.asc",
"*://*/*.asc?*",
"*://*/*.asc.*",
"*://*/*.asciidoc",
"*://*/*.asciidoc?*",
"*://*/*.asciidoc.*",
"*://*/*.txt",
"*://*/*.txt?*",
"*://*/*.txt.*",
"contextMenus"
],
The file URL is: file:///Applications/README.txt.
Thanks for your help.
Guillaume