Reputation: 37045
I have installed a handy Google Chrome extension that parses the DOM and shows the Document Outline.
The only problem is that it doesn't seem to work with local HTML files, such as:
file:///Users/Me/Desktop/OutlineTest.html
I went to the Extension preferences and noticed that another extension I like (The Microformats Parser) has a checkbox for "Allow access to file URLs".
So I went poking around and found that the main difference between the two extensions are that in the Microformats extension, it has the following in manifest.json
:
"matches": [ "http://*/*", "https://*/*", "file://*/*" ]
While the Outliner manifest has:
"matches": [ "http://*/*", "https://*/*" ]
So I added the file
protocol to the Outliner manifest and restarted Chrome, but the "Allow access to file URLs" is not showing up.
In case it matters, I'm running the newest public release of Chrome, with Developer mode for extensions disabled, on OSX Snow Leopard, and the manifest files I modified were at: ~/Library/Application Support/Google/Chrome/Default/Extensions/
.
So this raises a few questions:
Can Chrome extensions be modified post-install (as described above) or does the extension need to be rebuilt/reinstalled with the modifications?
Is there somewhere else in the extension that needs to be modified before the extension can be given rights to local files?
Why doesn't Google just have local file access as a default option for extensions, since it's turned off by default, hidden in the extension preferences, and likely to only be enabled by people who actually know the risk of enabling it? (This is obviously rhetorical, but I think a valid question for any Chrome developers out there who read this).
Upvotes: 8
Views: 1679
Reputation: 37045
I figured it out. I was going to delete, but thought this might help others looking to do the same thing.
You can now turn off developer mode (if you want), and the changes will still be in place.
Of course, if anyone has a better solution or knows why this one is not totally accurate, by all means, post the answer an I'll accept it.
Upvotes: 5