enhance(client): mobile twitter url can be used as widget (#9057)
This commit is contained in:
parent
253f005e80
commit
450076cfa4
|
@ -68,7 +68,7 @@ let tweetHeight = $ref(150);
|
||||||
|
|
||||||
const requestUrl = new URL(props.url);
|
const requestUrl = new URL(props.url);
|
||||||
|
|
||||||
if (requestUrl.hostname === 'twitter.com') {
|
if (requestUrl.hostname === 'twitter.com' || requestUrl.hostname === 'mobile.twitter.com') {
|
||||||
const m = requestUrl.pathname.match(/^\/.+\/status(?:es)?\/(\d+)/);
|
const m = requestUrl.pathname.match(/^\/.+\/status(?:es)?\/(\d+)/);
|
||||||
if (m) tweetId = m[1];
|
if (m) tweetId = m[1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue