[fusion-commits] r2381 - trunk/lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Fri May 13 13:52:04 EDT 2011


Author: madair
Date: 2011-05-13 10:52:04 -0700 (Fri, 13 May 2011)
New Revision: 2381

Modified:
   trunk/lib/fusion.js
Log:
re #448: load all scripts through document.write()

Modified: trunk/lib/fusion.js
===================================================================
--- trunk/lib/fusion.js	2011-05-12 19:54:21 UTC (rev 2380)
+++ trunk/lib/fusion.js	2011-05-13 17:52:04 UTC (rev 2381)
@@ -1397,27 +1397,12 @@
             coreScripts.push('text/'+locale+'.json');
         }
         
-        var agent = navigator.userAgent;
-        var docWrite = (agent.match("MSIE") || agent.match("Safari"));
-        if (docWrite) {
-            var allScriptTags = new Array(coreScripts.length);
-        }
+        var allScriptTags = new Array(coreScripts.length);
         for (var i = 0; i < coreScripts.length; i++) {
-            if (docWrite) {
-                allScriptTags[i] = "<script src='" + host + coreScripts[i] +
+            allScriptTags[i] = "<script src='" + host + coreScripts[i] +
                                    "'></script>"; 
-            } else {
-                var s = document.createElement("script");
-                s.src = host + coreScripts[i];
-                var h = document.getElementsByTagName("head").length ? 
-                           document.getElementsByTagName("head")[0] : 
-                           document.body;
-                h.appendChild(s);
-            }
         }
-        if (docWrite) {
-            document.write(allScriptTags.join(""));
-        }
+        document.write(allScriptTags.join(""));
     }
     
     /*********************************************************************************/



More information about the fusion-commits mailing list