| | 1 | //// |
|---|
| | 2 | /// This blob sucks in all the files in uncompressed form for ease of use |
|---|
| | 3 | /// |
|---|
| | 4 | |
|---|
| | 5 | OpenLayers = new Object(); |
|---|
| | 6 | OpenLayers._scriptName = "lib/OpenLayers.js"; |
|---|
| | 7 | OpenLayers._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 | } |
|---|