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).
On Windows and Mac, the update_URL must point to the Chrome Web Store where the extension must be hosted. The preferences file on Linux can point to your own server where you are hosting the extension. The preferences JSON file also supports installing an extension from a .crx extension file on the user's Linux computer.
Open a new tab and go to chrome://extensions. Switch on the Developer mode toggle. When developer mode is enabled, you will see additional options on the page. Click Update. Google Chrome will now download and install the latest version of Google Chrome extensions.
The extension's version (from the manifest file or the chrome://extensions page) The extension's ID (from the chrome://extensions page when you've loaded the packed extension) The following examples assume the version is 1.0 and the ID is aaaaaaaaaabbbbbbbbbbcccccccccc. Mac OS X and Linux only: Do not use the preferences file for Windows.
On Mac OS, the external extensions files for all users are only read if file system permissions prevent unprivileged users from changing it. If you do not see external extensions installed when Chrome is launched, there may be a permissions problem with the external extensions preferences files. To see if this is the problem, follow these steps:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With