Bookmarklet for Wikipedia, replacing PNGs on the fly
javascript:(function(){ var s=document.createElement('script');s.setAttribute('src','ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"');document.getElementsByTagName('body')[0].appendChild(s); $('img.tex').wrap('<span class="MathJax_Preview" />');$('.MathJax_Preview').after(function() { tex = $(this).find('img').attr("alt"); return " <script type='math/tex'>" + tex + "</" + "script>" ;});$.getScript('https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML');})() |
This comment has been minimized.
This comment has been minimized.
Are texvc macros different to the images displayed by default on wikipedia? It looks like they've just got the class 'tex', with the TeX stored in the 'alt' attribute. |
This comment has been minimized.
This comment has been minimized.
@christianp, that's true for almost all websites which use maths images. If a script was made for that then it would work everywhere, not just on Wikipedia. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Still missing: Wikipedia's texvc macros.