mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-05 01:13:40 -04:00
Updates options and readme.
This commit is contained in:
parent
ba793c27cb
commit
57d6ef9520
3 changed files with 14 additions and 15 deletions
|
@ -1,11 +1,15 @@
|
|||
|
||||
modulejs.define('core/settings', ['config', '_'], function (config, _) {
|
||||
modulejs.define('core/settings', ['config', '_', '$'], function (config, _, $) {
|
||||
|
||||
var settings = _.extend({
|
||||
h5aiAbsHref: '/_h5ai/'
|
||||
}, config.options);
|
||||
}, config.options),
|
||||
|
||||
settings.h5aiAbsHref = settings.h5aiAbsHref.replace(/\/*$/, '/');
|
||||
filename = 'client/js/scripts.js',
|
||||
src = $('script[src$="' + filename + '"]').attr('src'),
|
||||
appHref = src.substr(0, src.length - filename.length);
|
||||
|
||||
settings.h5aiAbsHref = src.substr(0, src.length - filename.length).replace(/\/*$/, '/');
|
||||
settings.rootAbsHref = /^(.*\/)[^\/]+\/?$/.exec(settings.h5aiAbsHref)[1];
|
||||
|
||||
return settings;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue