mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-11 09:08:14 +08:00
🐛 完善链接识别
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user