1663d9f5c8
For those without MathML-capable browsers, we present MathJax. It's crappy 'n slow, but it's better than nothing.
19 lines
3.7 KiB
JavaScript
19 lines
3.7 KiB
JavaScript
/*
|
|
* ../SourceForge/trunk/mathjax/jax/output/HTML-CSS/autoload/maction.js
|
|
*
|
|
* Copyright (c) 2010 Design Science, Inc.
|
|
*
|
|
* Part of the MathJax library.
|
|
* See http://www.mathjax.org for details.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0;
|
|
* you may not use this file except in compliance with the License.
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*/
|
|
|
|
MathJax.Unpack([
|
|
['(','function(','c,e){var g="1.0";var d,f,b;var a=','e.config.tooltip','=','MathJax.Hub.','Insert({delayPost:600,delayClear:600,offsetX:10,offsetY:5},',3,'||{});c.maction.Augment({HTMLtooltip:','e.addElement(','document.body,"div",{id:"','MathJax_Tooltip','"}),toHTML:',1,'i){i=this.HTMLhandleSize(this.HTMLcreateSpan(i));i.bbox=null;var h=this.getValues("actiontype","selection"),k;if','(this.data[h.selection-1',']){e.Measured',15,'].toHTML(i),i);if(','e.msieHitBoxBug','){var j=',9,'i,"span");','k=e.createFrame(','j',',i.bbox.h,i.bbox.d,i.bbox.w,0,"none");i.insertBefore(','j,i','.firstChild',');j','.style.marginRight=e.Em(-i.bbox.w',');if(e.msieInlineBlockAlignBug){k.style.verticalAlign=e.Em(e.getHD(i).d-i.bbox.d)}}else{',23,'i',25,'k,i',27,');k',29,')}k.className="MathJax_HitBox";k.id="MathJax-HitBox-"+this.spanID;if(','this.HTMLaction[h.actiontype',']){',39,'].call(this,i,k,h.selection)}}this.HTMLhandleSpace(i);this.HTMLhandleColor(i);return i},HTMLaction:{toggle:',1,'i,j,h){','this.selection','=h;j.onclick','=i.childNodes[1].','onclick=','MathJax.Callback(["','HTMLclick','",this]);j.','style.cursor',47,52,'="pointer"},statusline:',1,44,'j.','onmouseover',47,59,'=',49,'HTMLsetStatus',51,'onmouseout',47,66,'=',49,'HTMLclearStatus','",this]);j.onmouseover.autoReset=j.onmouseout.autoReset=true','},tooltip:',1,44,'if(this.data[1]&&','this.data[1].','isToken){j.title=j.alt',47,'title',47,'alt=',77,'data.join','("")}else{j.',59,47,59,'=',49,'HTMLtooltipOver',51,66,47,66,'=',49,'HTMLtooltipOut',72,'}}},',50,':',1,'j){',45,'++;if(',45,'>this.data.length){',45,'=1}var k=this;while(k.type!=="math"){k=k.inherit}var h=k.HTMLspanElement();while(h.nodeName.toLowerCase()!=="nobr"){h=h','.parentNode','}var i=h',111,';i.removeChild(h);var l=i;if(i',111,'.className==="MathJax_Display"){l=i',111,'}k.toHTML(i,l);if(!j){j','=window.event}if(','j.preventDefault','){',120,'()}if(','j.stopPropagation','){',124,'()}j.cancelBubble=true;j.returnValue=false;return false},',64,':',1,'h){window.status','=((this.data[1]&&',77,'isToken)?',77,84,'(""):',77,'toString())},',71,':',1,131,'=""},',91,':',1,'i){if(!i){i',119,'b','){clearTimeout(','b);b=null}','if(f',151,'f)}var h=i.clientX;var k=i.clientY;var j=',49,'HTMLtooltipPost','",this,','h+a.offsetX,k+a.offsetY]);f','=setTimeout(','j,a.delayPost)},',98,':',1,'h){if(f',151,'f);f=null}if(b',151,'b)}var i=',49,'HTMLtooltipClear',158,'80]);b',160,'i,a.delayClear)},',157,':',1,'i,m){f=null;if(b',151,152,'var l','=this.HTMLtooltip;','l','.style.display="','block";l','.style.opacity','="";l','.style.filter','=e.config.styles["#',11,'"].filter;if(this===d){return}l.style.left=i+"px";l.style.top=m+"px";l.innerHTML=\'<span class="MathJax"><nobr></nobr></span>\';e.getScales(l',27,',l',27,');var h=e.createStack(l',27,27,');var k=e.createBox(h);try{e.Measured(',77,'toHTML(k),k)}catch(j){if(!j.restart){throw j}l',185,'none";MathJax.Callback.After(["',157,158,'i,m],j.restart)}e.placeBox(k,0,0);e.createRule(l',27,27,',k.bbox.h,k.bbox.d,0);d=this},',171,':',1,'i){var h',183,'if(i<=0){h',185,'none";h',187,'=h',189,'="";b=null}else{h',187,'=i/100;h',189,'="alpha(opacity="+i+")";b',160,49,171,158,'i-20]),50)}}});',5,'Browser.Select({MSIE:',1,'h){',19,'=true}});',5,'Startup.signal.Post("HTML-CSS maction Ready");MathJax.Ajax.loadComplete(e.autoloadDir+"/maction.js")})(MathJax.ElementJax.mml,MathJax.OutputJax["HTML-CSS"]);']
|
|
]);
|
|
|