OpenLayers OpenLayers

Changeset 489

Show
Ignore:
Timestamp:
05/31/06 22:10:08 (2 years ago)
Author:
crschmidt
Message:

Fixed version of r488, my bad.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/build/OpenLayers.js

    r488 r489  
     1//// 
     2/// This blob sucks in all the files in uncompressed form for ease of use 
     3/// 
     4 
     5OpenLayers = new Object(); 
     6OpenLayers._scriptName = "lib/OpenLayers.js"; 
     7OpenLayers._getScriptLocation = function () { 
     8    var scriptLocation = ""; 
     9    var SCRIPT_NAME = OpenLayers._scriptName; 
     10  
     11    var scripts = document.getElementsByTagName('script'); 
     12    for (var i = 0; i < scripts.length; i++) { 
     13        var src = scripts[i].getAttribute('src'); 
     14        if (src) { 
     15            var index = src.lastIndexOf(SCRIPT_NAME);  
     16            // is it found, at the end of the URL? 
     17            if ((index > -1) && (index + SCRIPT_NAME.length == src.length)) {   
     18                scriptLocation = src.slice(0, -SCRIPT_NAME.length); 
     19                break; 
     20            } 
     21        } 
     22    } 
     23    return scriptLocation; 
     24} 
    125/*  Prototype JavaScript framework, version 1.4.0 
    226 *  (c) 2005 Sam Stephenson <sam@conio.net>