Changeset 5411
- Timestamp:
- 12/14/07 15:48:19 (1 year ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers.js
r5410 r5411 180 180 ); // etc. 181 181 182 183 184 var allScriptTags = ""; 185 var host = OpenLayers._getScriptLocation() + "lib/"; 186 182 var agent = navigator.userAgent; 183 var docWrite = (agent.match("MSIE") || agent.match("Safari")); 184 if(docWrite) { 185 var allScriptTags = new Array(jsfiles.length); 186 } 187 var host = OpenLayers._getScriptLocation() + "lib/"; 187 188 for (var i = 0; i < jsfiles.length; i++) { 188 if ( /MSIE/.test(navigator.userAgent) || /Safari/.test(navigator.userAgent)) {189 var currentScriptTag = "<script src='" + host + jsfiles[i] + "'></script>";190 allScriptTags += currentScriptTag;189 if (docWrite) { 190 allScriptTags[i] = "<script src='" + host + jsfiles[i] + 191 "'></script>"; 191 192 } else { 192 193 var s = document.createElement("script"); … … 198 199 } 199 200 } 200 if ( allScriptTags) {201 document.write(allScriptTags );201 if (docWrite) { 202 document.write(allScriptTags.join("")); 202 203 } 203 204 }
