Guest User

LaTeXhk.js

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