Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name LaTeXhk
- // @namespace LaTeXhk
- // @include /^https?:\/\/2ch\.(hk|pm|re|tf|wj)/sci/
- // @version 1
- // @grant GM_getValue
- // @grant GM_setValue
- // @grant GM_xmlhttpRequest
- // ==/UserScript==
- mathJaxOpt = document.createElement('script');
- mathJaxOpt.type = 'text/x-mathjax-config';
- mathJaxOpt[(mathJaxOpt.innerText===undefined?"textContent":"innerText")] = 'MathJax.Hub.Config({tex2jax: {inlineMath: [[\'$\',\'$\']]}});';
- document.getElementsByTagName('head')[0].appendChild(mathJaxOpt);
- mathJax = document.createElement('script');
- mathJax.type = 'text/javascript';
- mathJax.src = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
- document.getElementsByTagName('head')[0].appendChild(mathJax);
Advertisement
Add Comment
Please, Sign In to add comment