fred-wang / webextension-native-mathml

18 stars 3 forks source link

Implement exclusion list #2

Open fred-wang opened 7 years ago

fred-wang commented 7 years ago

When I go to that page, I get an error message dialog saying, "No PDK base URL could be detected. Asynchronous load of PDK requies a tp:baseUrl meta tag

The original issue is https://github.com/fred-wang/Mathzilla/issues/25 however the nbcnews.org web site does not seem to cause any problem any more.

The idea would be to do the exclusion for JS scripts only not for CSS stylesheets as the latter are unlikely to cause issues like in the original report. (BTW, it's probably more reliable to keep content scripts in manifest.json rather than inserting them dynamically as it was done before cacdd4c01bc46426490d56047b6717bdbde7bdb8).

Currently the match pattern module does not seem to be expose to WebExtensions (https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Match_patterns).

Matzeee commented 6 years ago

I am just trying wikiwand.com which renders math as svg. It looks way better than the original page, but of course I would prefer native MathML. Right now, your extension makes any math on wikiwand invisible.

If it is not possible to replace the svg with MathML, could you add a manual exclusion list?

fred-wang commented 6 years ago

Do you have an example? https://www.wikiwand.com/en/Fourier_transform renders with HTML/CSS for me and looks bad. By default, Wikipedia provide SVG + MathML hidden via CSS (but still exposed to screen readers) so it's easy to switch to native MathML. You should probably made a request to them and I could easily adapt the CSS stylesheet. Implementing exclusion list would be more difficult for me as I'll have to check how to do that for WebExtensions and don't have much time.

fred-wang commented 6 years ago

OK, I stand corrected. I had the native MathML addon enabled of course :-) I'll take a look tomorrow.

fred-wang commented 6 years ago

closed by #7

fred-wang commented 6 years ago

actually reopening, since the exclusion list was not implemented

stevenwdv commented 3 years ago

Would be nice to have, as this add-on breaks https://developercommunity.visualstudio.com/ because it crashes while trying to parse the MathJax cookie