Changeset 75

Show
Ignore:
Timestamp:
10/09/06 10:27:42 (2 years ago)
Author:
Jan-Klaas Kollhof
Message:

adding support for jsolait to guess it's install location so that baseURI does not have to be set manually or in the build script

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/experimental/jsolait/jsolait.js

    r74 r75  
    4646    mod.baseURI="./jsolait"; 
    4747    /*@baseURI end*/ 
    48          
     48     
     49    try{// to guess the location where jsolait is installed 
     50        var elems=document.getElementsByTagName('script'); 
     51        for(var i=0;i<elems.length;i++){ 
     52            var src=elems[i].getAttribute('src'); 
     53            var idx=src.indexOf('jsolait.js'); 
     54            if(idx>0){ 
     55                mod.baseURI=src.slice(0,idx-1); 
     56                break; 
     57            } 
     58        } 
     59    }catch(e){ 
     60    } 
     61 
    4962    ///The paths to the modules that come with jsolait. 
    5063    //do not edit the following lines, it will be replaced by the build script 
     
    782795        } 
    783796    }; 
    784  
    785797 
    786798//---------------------------------------------------String Format -------------------------------------------------------