On a file:// page without "Allow access to file URLs" the extension does nothing, silently: the manifest matches file:///*.diff / file:///*.patch, but Chrome only injects the content script after the user flips the per-extension toggle in chrome://extensions — and nothing in the UI points there. The toggle cannot be enabled programmatically (browser-side security), so the fix is guidance, not permission.
Proposal
When the toolbar icon is clicked on a file:// URL and chrome.extension.isAllowedFileSchemeAccess() resolves to false, open chrome://extensions/?id=<extension id> in a new tab (allowed via chrome.tabs.create) so the toggle is right in front of the user. One check plus one branch in the existing icon-click handler in the background worker.
Firefox needs no change — file:// matches from the manifest work there without a toggle, and isAllowedFileSchemeAccess resolves true.
Notes
- README ("Install" section) already tells users to enable the toggle; this issue is about the moment they skipped that line.
- Keep the behaviour scoped to
file:// tabs — on http(s) pages the icon keeps its current open-diff/back-to-request logic.
On a
file://page without "Allow access to file URLs" the extension does nothing, silently: the manifest matchesfile:///*.diff/file:///*.patch, but Chrome only injects the content script after the user flips the per-extension toggle inchrome://extensions— and nothing in the UI points there. The toggle cannot be enabled programmatically (browser-side security), so the fix is guidance, not permission.Proposal
When the toolbar icon is clicked on a
file://URL andchrome.extension.isAllowedFileSchemeAccess()resolves tofalse, openchrome://extensions/?id=<extension id>in a new tab (allowed viachrome.tabs.create) so the toggle is right in front of the user. One check plus one branch in the existing icon-click handler in the background worker.Firefox needs no change —
file://matches from the manifest work there without a toggle, andisAllowedFileSchemeAccessresolvestrue.Notes
file://tabs — on http(s) pages the icon keeps its current open-diff/back-to-request logic.