Transition to Jetpack SDK #62
Comments
WIP on branch no-restart |
Any new information on that? Since SDK will also be deprecated at the end of this year WebExtensions are the only way to go forward. |
As far as I'm aware, and according to all the tests I've done, there's no way to make Markdown Viewer work with either Jetpack or WebExtensions. Markdown Viewer needs to register the ".md" extension to Firefox (see this code) but it doesn't seem to be possible with either of the APIs, and I doubt it'll ever be possible in the future, given the direction taken by Mozilla to standardize extensions between browsers. The idea is good but not applicable since Gecko and Chromium platforms are fundamentally different. Enjoy Markdown Viewer if it still works for you, or else consider it dead :( |
What if you just check the URL if it ends on .md ? |
It's not enough, it breaks on Linux because Firefox will download the file instead of displaying it. |
With some persistence... I am happy to report that I was able to solve this issue. I was able to trick Firefox by modifying a local MIME type in Linux: https://wiki.archlinux.org/index.php/default_applications#New_MIME_types Here is what mine looks like currently with it working:
|
@braderhart This might be a local workaround not a real solution how this can be rewritten as a webextension. |
@Croydon I agree we need a better solution from Mozilla with WebExtensions for sure, but to finally get a fix—even if isn't the "proper" approach—it still solves a long-standing bug quite well for the time-being, and doesn't really seem to cause any issues. You may even be able to create a proper fix yourself using the info provided here: https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html |
If the only issue is reading the download stream as indicated by the code linked to in a previous comment, you should be able to do that since webRequest.onResponseData landed. |
Sorry, it hasn't landed yet, but is close. |
Landed. |
Following #20 and #46, + the fact Mozilla is progressively deprecating XUL extensions, it becomes urgent to transition to another solution.
The two solutions are the Jetpack SDK and WebExtensions.
WebExtensions don't allow mime-type registering (yet?) so they're not an option for now.
As always, bhollis/jsonview is a good source of inspiration since it does the same thing as Markdown Viewer but for JSON :)
Important things to check along the development:
The text was updated successfully, but these errors were encountered: