Merge pull request #1 from giga/base-url

Base url
This commit is contained in:
Sunny Ripert
2012-07-25 00:49:18 -07:00
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -69,6 +69,7 @@ module Precious
before do before do
@base_url = url('/') @base_url = url('/')
settings.wiki_options.merge!({ :base_path => @base_url }) unless settings.wiki_options.has_key? :base_path
end end
get '/' do get '/' do
@@ -269,7 +269,7 @@
} }
// attempt to load the definition for this language // attempt to load the definition for this language
var script_uri = '/javascript/editor/langs/' + markup_name + '.js'; var script_uri = baseUrl + '/javascript/editor/langs/' + markup_name + '.js';
$.ajax({ $.ajax({
url: script_uri, url: script_uri,
dataType: 'script', dataType: 'script',