移除联机模式的扩展加载限制
This commit is contained in:
parent
68c8d7118b
commit
c97989ac76
|
@ -441,13 +441,13 @@ export async function boot() {
|
|||
//lib.init.onload=backup_onload;
|
||||
_status.evaluatingExtension = false;
|
||||
}
|
||||
else if (config.get('mode') != 'connect' || (!localStorage.getItem(lib.configprefix + 'directstart') && show_splash)) {
|
||||
else if (!localStorage.getItem(lib.configprefix + 'directstart') && show_splash) {
|
||||
extensionlist.push(config.get('extensions')[name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (config.get('mode') != 'connect' || (!localStorage.getItem(lib.configprefix + 'directstart') && show_splash)) {
|
||||
if (!localStorage.getItem(lib.configprefix + 'directstart') && show_splash) {
|
||||
for (var name = 0; name < config.get('extensions').length; name++) {
|
||||
if (Reflect.get(window, 'bannedExtensions').includes(config.get('extensions')[name])) {
|
||||
continue;
|
||||
|
@ -576,7 +576,7 @@ export async function boot() {
|
|||
Reflect.get(ui, 'css')[stylesName[i]] = stylesLoaded[i];
|
||||
}
|
||||
|
||||
if (extensionlist.length && (config.get('mode') != 'connect' || show_splash)) {
|
||||
if (extensionlist.length) {
|
||||
_status.extensionLoading = [];
|
||||
_status.extensionLoaded = [];
|
||||
|
||||
|
|
|
@ -675,33 +675,27 @@ export async function onload(resetGameTimeout) {
|
|||
clickedNode = true;
|
||||
lib.config.mode = this.link;
|
||||
game.saveConfig('mode', this.link);
|
||||
if (this.link === 'connect') {
|
||||
localStorage.setItem(lib.configprefix + 'directstart', true);
|
||||
game.reload();
|
||||
if (game.layout != 'mobile' && lib.layoutfixed.indexOf(lib.config.mode) !== -1) {
|
||||
game.layout = 'mobile';
|
||||
ui.css.layout.href = lib.assetURL + 'layout/' + game.layout + '/layout.css';
|
||||
}
|
||||
else {
|
||||
if (game.layout != 'mobile' && lib.layoutfixed.indexOf(lib.config.mode) !== -1) {
|
||||
game.layout = 'mobile';
|
||||
else if (game.layout == 'mobile' && lib.config.layout != 'mobile' && lib.layoutfixed.indexOf(lib.config.mode) === -1) {
|
||||
game.layout = lib.config.layout;
|
||||
if (game.layout == 'default') {
|
||||
ui.css.layout.href = '';
|
||||
}
|
||||
else {
|
||||
ui.css.layout.href = lib.assetURL + 'layout/' + game.layout + '/layout.css';
|
||||
}
|
||||
else if (game.layout == 'mobile' && lib.config.layout != 'mobile' && lib.layoutfixed.indexOf(lib.config.mode) === -1) {
|
||||
game.layout = lib.config.layout;
|
||||
if (game.layout == 'default') {
|
||||
ui.css.layout.href = '';
|
||||
}
|
||||
else {
|
||||
ui.css.layout.href = lib.assetURL + 'layout/' + game.layout + '/layout.css';
|
||||
}
|
||||
}
|
||||
splash.delete(1000);
|
||||
delete window.inSplash;
|
||||
// 这不好删/m/,顺带lib.init.reset也不好删
|
||||
window.resetGameTimeout = setTimeout(lib.init.reset, 10000);
|
||||
|
||||
this.listenTransition(function () {
|
||||
lib.init.js(lib.assetURL + 'mode', lib.config.mode, proceed);
|
||||
}, 500);
|
||||
}
|
||||
splash.delete(1000);
|
||||
delete window.inSplash;
|
||||
// 这不好删/m/,顺带lib.init.reset也不好删
|
||||
window.resetGameTimeout = setTimeout(lib.init.reset, 10000);
|
||||
|
||||
this.listenTransition(function () {
|
||||
lib.init.js(lib.assetURL + 'mode', lib.config.mode, proceed);
|
||||
}, 500);
|
||||
}
|
||||
var downNode = function () {
|
||||
this.classList.add('glow');
|
||||
|
|
Loading…
Reference in New Issue