Last active
August 2, 2016 05:06
-
-
Save astronasutarou/f8e2b4c730c31c004dfc to your computer and use it in GitHub Desktop.
NASA ADS の abstract にて自動的に MathJax をインポートする GreaseMonkey スクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name ADS+MathJax | |
| // @namespace http://xr0038.net | |
| // @description automatically load MathJax in SAO/NASA ADS | |
| // @include http://adsabs.harvard.edu/abs/* | |
| // @version 1.1 | |
| // @grant none | |
| // ==/UserScript== | |
| (function(URL){ | |
| var scriptElem=document.createElement('SCRIPT'); | |
| scriptElem.setAttribute('type', 'text/x-mathjax-config'); | |
| scriptElem.innerHTML = 'MathJax.Hub.Config({ "HTML-CSS": {scale: 80}, tex2jax: {inlineMath: [ [\'$\',\'$\'] ]} });'; | |
| document.body.appendChild(scriptElem); | |
| var scriptElem=document.createElement('SCRIPT'); | |
| scriptElem.setAttribute('language','JavaScript'); | |
| scriptElem.setAttribute('src',URL); | |
| document.body.appendChild(scriptElem); | |
| })('http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment