1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-10-31 23:31:48 +09:00

enhance(client): mobile twitter url can be used as widget (#9057)

This commit is contained in:
Caipira 2022-08-24 21:02:06 +09:00 committed by GitHub
parent 253f005e80
commit 450076cfa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ let tweetHeight = $ref(150);
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+)/);
if (m) tweetId = m[1];
}