diff --git a/debug/include.js b/debug/include.js
index a8a89ba4..820a1fdd 100644
--- a/debug/include.js
+++ b/debug/include.js
@@ -74,7 +74,10 @@
'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++) {
- document.writeln("");
+ document.writeln("");
}
})();
\ No newline at end of file