orsharir / github-mathjax

Chrome extension for rendering LaTeX equations in GitHub with MathJax
Other
153 stars 49 forks source link

Do the same for Firefox? #6

Open Naereen opened 7 years ago

Naereen commented 7 years ago

Well, everything is in the title: could you (try to) do a Firefox version of this extension? It seems interesting and well designed, but only for Chrome! :fox_face: !

orsharir commented 7 years ago

Given that I no longer use Firefox myself, this would be a low priority. However, once I'll have time, I'll look into how much work it would be to port the extension.

tobiasdiez commented 6 years ago

I just tried it with firefox (cloned the repository and invoked web-ext run). The add-on runs and works perfectly without any modifications! It would be really awesome if you could upload it to https://addons.mozilla.org/.

Naereen commented 6 years ago

@tobiasdiez who that's great.

I have no idea how to do that, I guess you just need to create an account and upload it? Maybe @orsharir could do it so that it is kept up-to-date?

Naereen commented 6 years ago

@tobiasdiez @orsharir Any update?

orsharir commented 6 years ago

I'm going to be a bit busy in the coming weeks. Hopefully, I'll be able to look into it afterwards.

Naereen commented 6 years ago

@orsharir OK, great!

Naereen commented 6 years ago

Hi, Have you tried?

traversaro commented 6 years ago

Hi @orsharir , as the people in my team started to use you extension and I am a Firefox user, I packaged your extension for Firefox at https://addons.mozilla.org/en-US/firefox/addon/github-with-mathjax-support .

Let me know if you want to package it on the Firefox Add Ons website yourself, I would be happy to remove my unofficial package in that case.

Naereen commented 6 years ago

@traversaro it works perfectly, good job :clap:!

traversaro commented 6 years ago

Note that the extension itself did not need any modification, I just uploaded in its current form to https://addons.mozilla.org/ .

traversaro commented 6 years ago

Unfortunately the extensions was removed after review on March 16th 2018. This was the review:

Details: This version did not pass the review because of the following issues:

1) JQuery 1. is no longer accepted. Please use JQuery 3. We accept JQuery/JQuery-UI libraries downloaded from 'ajax.googleapis.com', 'jquery.com' or 'jqueryui.com'; and used without any modification (downloaded and not copy pasted). Minified versions are better. (file-name change does not matter) I'm sorry, but we cannot accept modified, re-configured or customized libraries. Please use non-custom versions of jquery-ui, as well as the stock version of jquery and others, that match the original checksums on the maintainer's website. e.g.: jquery-min-1.7.2.js

2) This version contains obfuscated, minified, concatenated or otherwise machine-generated code. Please provide the original sources, together with instructions on how to generate the final XPI. Source code must be provided as an archive and uploaded using the source code upload field, which can be done during submission or on the version page in the developer hub.

Please read through the instructions at https://developer.mozilla.org/en-US/Add-ons/Source_Code_Submission. More Information: https://blog.mozilla.org/addons/2016/04/05/improved-review-time-with-links-to-sources/

Established libraries (eg: JQuery, bootstrap) do not require the inclusion of their sources. Please use non-custom versions of jquery-ui, as well as the stock version of jquery and others, that match the original checksums on the maintainer's website.

Please fix them and submit again. Thank you.

I am trying to prepare a Firefox friendly version, let me know if you are interested in merging PR for Firefox compatibility.

traversaro commented 6 years ago

Unfortunately my javascript skills are not sufficient to migrate the extension to the latest jQuery, so for the time being I am giving up on this porting.

Naereen commented 6 years ago

Neither are mine… Don't try too much if you don't have time, it's probably not worth it…

traversaro commented 6 years ago

Apparently you can also easily distribute the extension on your own as .xpi file, without passing through the addons.mozilla.org website, but just uploading the extension to https://addons.mozilla.org/en-US/developers/addon/submit/distribution for signing it.

See https://github.com/traversaro/github-mathjax-firefox for the version of this extension for Firefox.

nunoguedelha commented 6 years ago

@traversaro thanks, works really well. Install is automatic just by clicking on the xpi file link on your repo.

Naereen commented 6 years ago

Well yes it works, but it is completely unsecured, and that's the whole purpose of https://addons.mozilla.org

zombie110year commented 5 years ago

It do well in Firefox straightly. I just load the manifest.json from the main repo in Firefox's debug mode. Some modifies have been done?

mahyarmirrashed commented 2 years ago

Are there any plans to continue migrating this to Firefox? I followed the rabbit trail and found xhub which does something similar but they don't have a port for Firefox either. Currently debating whether to update/port this or just port theirs.

tobiasdiez commented 2 years ago

https://github.com/traversaro/github-mathjax-firefox still works for me, but xhub seems to be the go-to solution in the longterm. However, they are currently using the new manifest_version: 3 which is not yet supported by firefox https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/manifest_version (although there was recent progress on this, so maybe in nightly versions of firefox it might work)

mahyarmirrashed commented 2 years ago

https://github.com/traversaro/github-mathjax-firefox still works for me, but xhub seems to be the go-to solution in the longterm. However, they are currently using the new manifest_version: 3 which is not yet supported by firefox https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/manifest_version (although there was recent progress on this, so maybe in nightly versions of firefox it might work)

It seems that they made the code for XHUB private now.