Diff for /loncom/html/adm/jsMath/plugins/autoload.js between versions 1.2 and 1.3

version 1.2, 2006/03/27 19:32:29 version 1.3, 2006/05/17 22:19:38
Line 86 Line 86
 /*  /*
  *  Make sure jsMath.Autoload is available   *  Make sure jsMath.Autoload is available
  */   */
 if (jsMath == null) {jsMath = {}}  if (!window.jsMath) {window.jsMath = {}}
 if (jsMath.Autoload == null) {jsMath.Autoload = {}}  if (jsMath.Autoload == null) {jsMath.Autoload = {}}
 jsMath.Add = function (dst,src) {for (var id in src) {dst[id] = src[id]}},  jsMath.Add = function (dst,src) {for (var id in src) {dst[id] = src[id]}},
 jsMath.document = document; // tex2math needs this  jsMath.document = document; // tex2math needs this
Line 192  jsMath.Add(jsMath.Autoload,{ Line 192  jsMath.Add(jsMath.Autoload,{
    */     */
   Check2: function () {    Check2: function () {
     this.Script.tex2math = 0;      this.Script.tex2math = 0;
     this.needsJsMath = 0;      this.needsJsMath = 0; if (this.checkElement == null) {this.checkElement = null}
     if (this.findMathElements) {      if (this.findMathElements) {
       this.needsJsMath = this.areMathElements(this.checkElement);        this.needsJsMath = this.areMathElements(this.checkElement);
     }      }
Line 270  jsMath.Add(jsMath.Autoload,{ Line 270  jsMath.Add(jsMath.Autoload,{
     if (!obj.getElementsByTagName) {return false}      if (!obj.getElementsByTagName) {return false}
     var math = obj.getElementsByTagName('div');      var math = obj.getElementsByTagName('div');
     for (var k = 0; k < math.length; k++)       for (var k = 0; k < math.length; k++) 
       {if (math[k].className == 'math') {return true}}        {if (math[k].className.match(/(^| )math( |$)/)) {return true}}
     math = obj.getElementsByTagName('span');      math = obj.getElementsByTagName('span');
     for (var k = 0; k < math.length; k++)       for (var k = 0; k < math.length; k++) 
       {if (math[k].className == 'math') {return true}}        {if (math[k].className.match(/(^| )math( |$)/)) {return true}}
     return false;      return false;
   },    },
   

Removed from v.1.2  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>