🐛 完善链接识别

This commit is contained in:
BTMuli
2023-12-11 01:08:44 +08:00
parent 0965524003
commit cfc1f65e3e

View File

@@ -154,9 +154,9 @@ async function toLink() {
function isMysAct(url: string): boolean {
const link = new URL(url);
const prefix = ["https://act.mihoyo.com/", "https://mhyurl.cn", "https://webstatic.mihoyo.com"];
if (prefix.includes(link.origin)) {
if (link.origin == "https://webstatic.mihoyo.com") {
const prefix = ["act.mihoyo.com", "mhyurl.cn", "webstatic.mihoyo.com", "qaa.miyoushe.com"];
if (prefix.includes(link.hostname)) {
if (link.hostname == "webstatic.mihoyo.com") {
return link.pathname.includes("event");
}
return true;