Dynamically determine path of scripts to include in include.js
This commit is contained in:
parent
94a15edef9
commit
e7e79ccb07
@ -74,7 +74,10 @@
|
|||||||
'map/ext/Map.Control.js'
|
'map/ext/Map.Control.js'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
var scriptTags = document.getElementsByTagName('script');
|
||||||
|
// Last script tag inserted/evaluated "should" be include.js
|
||||||
|
var path = scriptTags[scriptTags.length - 1].src.split('include.js')[0];
|
||||||
for (var i = 0; i < scripts.length; i++) {
|
for (var i = 0; i < scripts.length; i++) {
|
||||||
document.writeln("<script type='text/javascript' src='../../src/" + scripts[i] + "'></script>");
|
document.writeln("<script type='text/javascript' src='" + path + "../src/" + scripts[i] + "'></script>");
|
||||||
}
|
}
|
||||||
})();
|
})();
|
Loading…
Reference in New Issue
Block a user