mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-04 08:59:39 -04:00
More refactorings.
This commit is contained in:
parent
c40fac67d0
commit
fc9f846cb5
13 changed files with 248 additions and 212 deletions
|
@ -31,27 +31,29 @@
|
|||
// @include "inc/**/*.js"
|
||||
|
||||
var $ = jQuery,
|
||||
mode = $('script[src$="scripts.js"]').data('mode');
|
||||
mode = $('script[src$="scripts.js"]').data('mode'),
|
||||
url = '.',
|
||||
module = 'main';
|
||||
|
||||
if ($('html').hasClass('no-browser')) {
|
||||
|
||||
} else if (mode === 'info') {
|
||||
|
||||
$(function () { modulejs.require('info'); });
|
||||
|
||||
} else {
|
||||
|
||||
$.ajax({
|
||||
url: '.',
|
||||
data: {action: 'get', options: true, types: true, langs: true, server: true},
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
success: function (config) {
|
||||
|
||||
modulejs.define('config', config);
|
||||
$(function () { modulejs.require('main'); });
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (mode === 'info') {
|
||||
url = 'server/php/index.php';
|
||||
module = 'info';
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
data: {action: 'get', setup: true, options: true, types: true, langs: true},
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
success: function (config) {
|
||||
|
||||
modulejs.define('config', config);
|
||||
$(function () { modulejs.require(module); });
|
||||
}
|
||||
});
|
||||
|
||||
}());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue