From ae90855b9f29be010aca9142fcfaf7e3378a4c50 Mon Sep 17 00:00:00 2001 From: Simon Eisenmann Date: Mon, 11 Jul 2016 17:30:03 +0200 Subject: [PATCH] Compute 'extra.d' relative URL --- static/js/main.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/static/js/main.js b/static/js/main.js index b43dd87f..e83670ff 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -121,6 +121,18 @@ require.config({ } }); +(function() { + // Dynamic extraD, go up all segments from our current app. + var extraD = require.toUrl('extra.d').split('/'); + for (var i = 0; i < extraD.length - 1; i++) { + extraD[i] = '..' + } + extraD = extraD.join('/'); + require.config({ + 'extra.d': extraD + }); +}()); + (function() { var debugDefault = window.location.href.match(/(\?|&)debug($|&|=)/); // Overwrite console to not log stuff per default.