From e94c9f31886f57427f21081789a73f90056830ee Mon Sep 17 00:00:00 2001 From: Joe Germuska Date: Wed, 7 May 2014 10:41:30 -0500 Subject: [PATCH] change method for establishing JS distribution url root. Closes #460. Thanks @brunobg --- source/js/Core/Embed/Embed.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/js/Core/Embed/Embed.js b/source/js/Core/Embed/Embed.js index 5427591..441b215 100644 --- a/source/js/Core/Embed/Embed.js +++ b/source/js/Core/Embed/Embed.js @@ -8,9 +8,10 @@ var WebFontConfig; -if(typeof embed_path == 'undefined' || typeof embed_path == 'undefined') { +if(typeof embed_path == 'undefined') { // REPLACE WITH YOUR BASEPATH IF YOU WANT OTHERWISE IT WILL TRY AND FIGURE IT OUT - var embed_path = getEmbedScriptPath("storyjs-embed.js").split("js/")[0]; + var _tmp_script_path = getEmbedScriptPath("storyjs-embed.js"); + var embed_path = _tmp_script_path.substr(0,_tmp_script_path.lastIndexOf('js/')) } function getEmbedScriptPath(scriptname) {