Fix relative path issue

This commit is contained in:
Amauri CHAMPEAUX 2014-09-22 16:44:18 +02:00
parent 5409e2220a
commit 05aa187f0a
1 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,12 @@
/*jslint browser: true */ /*jslint browser: true */
// define correct path for files inclusion
var scripts = document.getElementsByTagName('script'),
path = scripts[scripts.length - 1].src.split('?')[0],
cdn = path.split('/').slice(0, -1).join('/') + '/';
var tarteaucitron = { var tarteaucitron = {
"cdn": "", "cdn": cdn,
"user": {}, "user": {},
"lang": {}, "lang": {},
"services": {}, "services": {},