regard x.com as twitter in MkUrlPreview.vue

This commit is contained in:
naskya 2023-08-18 22:27:57 +00:00
parent e25e2ecb68
commit 58d5b76edb

View File

@ -139,8 +139,7 @@ if (!["http:", "https:"].includes(requestUrl.protocol))
throw new Error("invalid url");
if (
requestUrl.hostname === "twitter.com" ||
requestUrl.hostname === "mobile.twitter.com"
["twitter.com", "mobile.twitter.com", "x.com"].includes(requestUrl.hostname)
) {
const m = requestUrl.pathname.match(/^\/.+\/status(?:es)?\/(\d+)/);
if (m) tweetId.value = m[1];