Merge pull request #288 from mpriour/multiple-builds

Make the getScriptLocation function work with mobile & light builds
This commit is contained in:
Éric Lemoine
2012-03-12 07:19:42 -07:00
5 changed files with 49 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ var OpenLayers = {
* {String} Path to this script
*/
_getScriptLocation: (function() {
var r = new RegExp("(^|(.*?\\/))(OpenLayers\.js)(\\?|$)"),
var r = new RegExp("(^|(.*?\\/))(OpenLayers.*?\\.js)(\\?|$)"),
s = document.getElementsByTagName('script'),
src, m, l = "";
for(var i=0, len=s.length; i<len; i++) {