jscher2000 / Content-Type-Fixer-extension

Firefox extension to override dumb Content-Type headers with correct values
Mozilla Public License 2.0
23 stars 2 forks source link

possible to trigger this on file:// requests? #11

Open jzacsh opened 2 years ago

jzacsh commented 2 years ago

this might be a generic firefox-addons question, but maybe not... is it possible for me to override the behavior of firefox's own behavior of .md files? I found your reply in this mozilla forum thread, but that's discussing http requests. In chrome I'd often visit ~/TODOs.md and then a separate markdown extension would render that text nicely for me. When I visit file:///home/myuser/TODOs.md in firefox however, it tries to download it (as if served by a server with an HTTP header content-disposition: attachment).

tl;dr When I checkout the "Log of Recent Request" page for this extension, I don't see any of the requests triggered by my file:// browsing.. Is there a button I have to click somewhere to give the addon access to this traffic?

jscher2000 commented 2 years ago

The extension works by modifying the HTTP headers sent by web servers when Firefox notifies it of a new retrieval. With local files, the extension isn't informed about the opening of the file, so it can't take any action. I don't know whether there is any way to monitor opening local files.