ROOT_URL for future use

This commit is contained in:
mourner 2010-09-16 19:38:58 +03:00
parent d6044296e8
commit a61f89860b

View File

@ -3,12 +3,22 @@
*/
L = {
version: '0.0.1',
VERSION: '0.0.1',
_originalL: window.L,
ROOT_URL: (function() {
var scripts = document.getElementsByTagName('script');
for (var i = 0, len = scripts.length; i < len; i++) {
var src = scripts[i].src,
res = src && src.match(/^(.*\/)leaflet-*\w*\.js.*$/);
if (res && res[1]) { return res[1]; }
}
return '../dist/';
})(),
noConflict: function() {
window.L = this._originalL;
return this;
}
},
_originalL: window.L
};