[fusion-commits] r2382 - branches/fusion-2.2/lib

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


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

Modified:
   branches/fusion-2.2/lib/fusion.js
Log:
re #448: load all scripts through document.write(); patch applied to 2.2 branch

Modified: branches/fusion-2.2/lib/fusion.js
===================================================================
--- branches/fusion-2.2/lib/fusion.js	2011-05-13 17:52:04 UTC (rev 2381)
+++ branches/fusion-2.2/lib/fusion.js	2011-05-13 17:52:34 UTC (rev 2382)
@@ -1396,27 +1396,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