feat: entry.

This commit is contained in:
Rintim 2024-01-22 17:51:08 +08:00
parent 18b301b82a
commit 1fb89618de
No known key found for this signature in database
GPG Key ID: BE9E1EA615BACFCF
1 changed files with 35 additions and 34 deletions

View File

@ -1,34 +1,35 @@
/* /*
const module = import('../noname.js'); const module = import('../noname.js');
module.then(({ ai, game, get, lib, _status, ui, boot }) => { module.then(({ ai, game, get, lib, _status, ui, boot }) => {
const coreAndVersion = get.coreInfo(); const coreAndVersion = get.coreInfo();
const core = coreAndVersion[0], version = coreAndVersion[1]; const core = coreAndVersion[0], version = coreAndVersion[1];
if (core === 'chrome' && !isNaN(version) && version < 77) { if (core === 'chrome' && !isNaN(version) && version < 77) {
const tip = '检测到您的浏览器内核版本小于77请及时升级浏览器或手机webview内核'; const tip = '检测到您的浏览器内核版本小于77请及时升级浏览器或手机webview内核';
console.warn(tip); console.warn(tip);
game.print(tip); game.print(tip);
const redirect_tip = '您使用的浏览器或无名杀客户端内核版本过低,将在未来的版本被废弃!\n点击“确认”以前往GitHub下载最新版无名杀客户端可能需要科学上网。'; const redirect_tip = '您使用的浏览器或无名杀客户端内核版本过低,将在未来的版本被废弃!\n点击“确认”以前往GitHub下载最新版无名杀客户端可能需要科学上网。';
if (confirm(redirect_tip)) { if (confirm(redirect_tip)) {
window.open('https://github.com/libccy/noname/releases/tag/chromium77-client'); window.open('https://github.com/libccy/noname/releases/tag/chromium77-client');
} }
} }
boot().then(lib.other.ignore); boot().then(lib.other.ignore);
}); });
*/ */
import { game, get, lib, boot } from "../noname.js" import { game, get, lib, boot } from "../noname.js"
import { userAgent } from "../noname/util/index.js";
const coreAndVersion = get.coreInfo();
const core = coreAndVersion[0], version = coreAndVersion[1]; const coreAndVersion = get.coreInfo();
if (core === 'chrome' && !isNaN(version) && version < 77) { const core = coreAndVersion[0], version = coreAndVersion[1];
const tip = '检测到您的浏览器内核版本小于77请及时升级浏览器或手机webview内核'; if (core === 'chrome' && !isNaN(version) && version < 77) {
console.warn(tip); const tip = '检测到您的浏览器内核版本小于77请及时升级浏览器或手机webview内核';
game.print(tip); console.warn(tip);
const redirect_tip = '您使用的浏览器或无名杀客户端内核版本过低,将在未来的版本被废弃!\n点击“确认”以前往GitHub下载最新版无名杀客户端可能需要科学上网。'; game.print(tip);
if (confirm(redirect_tip)) { const redirect_tip = `您使用的浏览器或无名杀客户端内核版本过低,将在未来的版本被废弃!\n目前使用的浏览器UA信息为\n${userAgent}\n点击“确认”以前往GitHub下载最新版无名杀客户端可能需要科学上网`;
window.open('https://github.com/libccy/noname/releases/tag/chromium77-client'); if (confirm(redirect_tip)) {
} window.open('https://github.com/libccy/noname/releases/tag/chromium77-client');
} }
boot().then(lib.other.ignore); }
boot().then(lib.other.ignore);