Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // version 0.1 BETA!
- // 2012-01-231
- // Copyright (c) 2012, Leo Butler
- // Released under the GPL license
- // http://www.gnu.org/copyleft/gpl.html
- //
- // --------------------------------------------------------------------
- //
- // This is a Greasemonkey user script. To install it, you need
- // Greasemonkey 0.3 or later: http://greasemonkey.mozdev.org/
- // Then restart Firefox and revisit this script.
- // Under Tools, there will be a new menu item to "Install User Script".
- // Accept the default configuration and install.
- //
- // --------------------------------------------------------------------
- //
- // ==UserScript==
- // @name search
- // @namespace http://www.a.namespace.without.a.name.org/projects/greasemonkey/
- // @description example script to put MathJaX on Maxima's Gmane page
- // @include http://blog.gmane.org/gmane.comp.mathematics.maxima.general
- // @include http://comments.gmane.org/gmane.comp.mathematics.maxima.general
- // ==/UserScript==
- // See HACK 47 of Greasemonkey Hacks
- var mathjax = document.createElement('script');
- mathjax.type="text/javascript";
- mathjax.src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
- var mathjaxConfig=document.createElement('script');
- mathjaxConfig.type="text/x-mathjax-config";
- mathjaxConfig.innerHTML='MathJax.Hub.Config({'+
- "tex2jax: {inlineMath: [['\\(','\\)']],"+
- "displayMath: [['$$','$$'], ['\\[','\\]']]}}};";
- var head=document.getElementsByTagName('head')[0];
- head.appendChild(mathjax);
- head.appendChild(mathjaxConfig);
Advertisement
Add Comment
Please, Sign In to add comment