-
Notifications
You must be signed in to change notification settings - Fork 28
Not loading md files in firefox on Ubuntu Linux #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hmm. I'm sorry you're experiencing trouble! Local file loading is of course my primary test case. But I'm on 55.0.1. I've also used Developer Edition 55 and 56. I'll try to set up a VM and test with v52 on Linux, but my guess is that support for Web Extensions isn't fully baked into the older FF version. Can you try a more recent version? (I know, it won't support Java though.) |
I just went to 52.3.0 but that does not solve the problem. But it should be theoretically possible since I had this plugin on another machine, which worked fine with the same version of Firefox. Sadly that plugin is not installable anymore now but it still was 2-3 weeks ago. (It seems they changed the Firefox compatibility for that plugin to a version prior to mine, even though it worked fine...) |
Not necessarily. Thiht's plugin uses Firefox's old and deprecated plugin technology. Mine uses the new Web Extensions approach. Under the hood they both use the same markdown-to-html library, but how Firefox interfaces with it is entirely different. |
I tried an Ubuntu VM, but it came with FF 16, and I wasn't able to get it to upgrade properly. Will try again later with more recent Ubuntu. BTW, regarding the title of this issue. This plugin doesn't trigger based on mime time. It installs itself with web extensions to trigger on any page load, and then it filters based on the extension of the final URL path segment. |
I was able to create an Ubuntu 16.04 VM which had FF 54.0, and I did see the same problem you experienced! It wasn't a problem with the WebExtension, but with how Firefox handles the unknown file type. I followed these instructions on superuser (with update-mime-database) to give markdown extensions a mime type, and Firefox would then load the local .md file, allowing markdown-viewer-webext to style it. Let me know if it works for you as well. BTW, these other instructions on the same thread (modifying mimeTypes.rdf) did not work for me and were unnecessary. |
Works like a charm. Thank you very much. So it was a Firefox issue under Linux, not one from the plugin. |
@KeithLRobertson creating the |
Any chance of linking to this workaround directly from the add-on description shown in about:addons? This was exactly what I needed to get my file URLs working, but as a new user it took me a while to find it. |
This is needed for https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-webext/ to work properly with local markdown files. Also see Cimbali/markdown-viewer#2
Annoying. Find a way to automate this or let new users know up front. |
Unfortunately, updating the MIME database does not work as expected for me on CentOS (7.4) with Firefox 52.7.2. |
Just wanted to mention that the instructions above allowed me to work around the problem using Firefox 63.0 on Ubuntu 18.04.1 using v.1.4.0 of the extension. I think it would be a useful addition to the master doc/extension homepage. I was using the extension previously and did not encounter that problem. markdown-viewer is my primary Markdown renderer so I am glad to see it is working again. Thanks for the useful extension! |
The workaround with writing a mime type file and updating db is not working for me.. All I see is the source mardown |
Nixos 19.03 here, Linux kernel 5.1.18, Firefox 68.0esr (64-bit). Fixed with these instructions on superuser, which were linked by KeithLRobertson. I will copypaste them here, so they dont disappear: $ touch ~/.local/share/mime/packages/text-markdown.xml paste:
Save & quit. |
Can't get this working with Ubuntu 18.04 and Firefox 68.0.2 (64-bit). Edit: Got it working by allowing all origins in the addon settings, and toggling the reader view in the right side of the address bar. |
This is quite an old issue and granted that the above works in so far as it indeed triggers the rendering of markdown. But is there a chance that FF would render the proper mime type as well? Just asking as adding the mime type suggested is actually demoting all markdown files from |
I have not attempted this without the markdown override for quite awhile. The original issue was FF would not even try to render the markdown. When it saw the mime type, it just oferred to download the file. The plugin did not get a chance at the content. |
ic. :S I thought there might be a way like the hooks of a plugin but I have no idea about the inner workings of ff at all. Just use the plugin for preview all the time and sometimes it would be very convenient to spot the |
Since the upgrade to Firefox 80.0.1 on Linux (Debian Sid unstable) the fix described in #2 (comment) to associate local files with extension Instead I had to add the mapping in
See also https://bugzilla.mozilla.org/show_bug.cgi?id=1319262 |
Hi, I installed the markdown-viewer plugin for Firefox from here. But if I try to open a markdown file (e. g. file:///home/me/test.md) from my disk Firefox asks me if I want to save the file. I have found no way to view the file instead of downloading it. My Firefox version is 52.2.0 (64-bit) ESR.
Greetings
The text was updated successfully, but these errors were encountered: