From 34570a02c54590de24782cbb37ebbbc88ac560ed Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Wed, 1 Jun 2011 03:46:59 -0400 Subject: [PATCH] re-add mathml.js Signed-off-by: Jim Pryor --- mathml.js | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 mathml.js diff --git a/mathml.js b/mathml.js new file mode 100644 index 00000000..a72c2e59 --- /dev/null +++ b/mathml.js @@ -0,0 +1,70 @@ +/* +March 19, 2004 MathHTML (c) Peter Jipsen http://www.chapman.edu/~jipsen +Released under the GNU General Public License version 2 or later. +See the GNU General Public License (at http://www.gnu.org/copyleft/gpl.html) +for more details. +*/ + +function convertMath(node) {// for Gecko + if (node.nodeType==1) { + var newnode = + document.createElementNS("http://www.w3.org/1998/Math/MathML", + node.nodeName.toLowerCase()); + for(var i=0; i < node.attributes.length; i++) + newnode.setAttribute(node.attributes[i].nodeName, + node.attributes[i].nodeValue); + for (var i=0; i"); + document.write(""); +} +if(typeof window.addEventListener != 'undefined'){ + window.addEventListener('load', convert, false); +} +if(typeof window.attachEvent != 'undefined') { + window.attachEvent('onload', convert); +} -- 2.11.0