return an empty string if the script don't ends with 'OpenLayers.js', add OpenLayers.VERSION_NUMBER. r=elemoine (closes #2873)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10823 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -7,9 +7,13 @@ var OpenLayers = {
|
|||||||
singleFile: true,
|
singleFile: true,
|
||||||
_getScriptLocation: (function() {
|
_getScriptLocation: (function() {
|
||||||
var s = document.getElementsByTagName('script');
|
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; });
|
return (function() { return l; });
|
||||||
})()
|
})()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constant: VERSION_NUMBER
|
||||||
|
*/
|
||||||
|
OpenLayers.VERSION_NUMBER="$Revision$";
|
||||||
|
|||||||
Reference in New Issue
Block a user