regard x.com as twitter in MkUrlPreview.vue
This commit is contained in:
parent
e25e2ecb68
commit
58d5b76edb
1 changed files with 1 additions and 2 deletions
|
@ -139,8 +139,7 @@ if (!["http:", "https:"].includes(requestUrl.protocol))
|
||||||
throw new Error("invalid url");
|
throw new Error("invalid url");
|
||||||
|
|
||||||
if (
|
if (
|
||||||
requestUrl.hostname === "twitter.com" ||
|
["twitter.com", "mobile.twitter.com", "x.com"].includes(requestUrl.hostname)
|
||||||
requestUrl.hostname === "mobile.twitter.com"
|
|
||||||
) {
|
) {
|
||||||
const m = requestUrl.pathname.match(/^\/.+\/status(?:es)?\/(\d+)/);
|
const m = requestUrl.pathname.match(/^\/.+\/status(?:es)?\/(\d+)/);
|
||||||
if (m) tweetId.value = m[1];
|
if (m) tweetId.value = m[1];
|
||||||
|
|
Loading…
Reference in a new issue