移除联机模式的扩展加载限制

This commit is contained in:
Spmario233 2024-04-09 19:19:40 +08:00
parent 68c8d7118b
commit c97989ac76
2 changed files with 20 additions and 26 deletions

View File

@ -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 = [];

View File

@ -675,11 +675,6 @@ 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();
}
else {
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';
@ -702,7 +697,6 @@ export async function onload(resetGameTimeout) {
lib.init.js(lib.assetURL + 'mode', lib.config.mode, proceed);
}, 500);
}
}
var downNode = function () {
this.classList.add('glow');
}