[OpenLayers-Trac] Re: [OpenLayers] #2873: Build: Compressed code
"OpenLayers.js" can be reduced by 9k
OpenLayers
trac-20090302 at openlayers.org
Wed Oct 13 09:39:35 EDT 2010
#2873: Build: Compressed code "OpenLayers.js" can be reduced by 9k
----------------------+-----------------------------------------------------
Reporter: jorix | Owner: jorix
Type: feature | Status: reopened
Priority: minor | Milestone: 2.11 Release
Component: general | Version: 2.10
Resolution: | Keywords:
State: Review |
----------------------+-----------------------------------------------------
Changes (by fredj):
* state: Complete => Review
Comment:
{{{
Index: lib/OpenLayers/SingleFile.js
===================================================================
--- lib/OpenLayers/SingleFile.js (revision 10822)
+++ lib/OpenLayers/SingleFile.js (working copy)
@@ -7,7 +7,8 @@
singleFile: true,
_getScriptLocation: (function() {
var s = document.getElementsByTagName('script');
- var l =
s[s.length-1].getAttribute("src").match(/(^|(.*?\/))(OpenLayers\.js)(\?|$)/)[1];
+ var match =
s[s.length-1].getAttribute("src").match(/(^|(.*?\/))(OpenLayers\.js)(\?|$)/);
+ var l = match ? match[1] : "";
return (function() { return l; });
})()
};
}}}
Works on Chromium and FF3.6. Please review.
--
Ticket URL: <http://trac.openlayers.org/ticket/2873#comment:17>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list