refactor
This commit is contained in:
parent
645dbebd86
commit
b80ec1fa3f
9 changed files with 40 additions and 47 deletions
|
|
@ -67,7 +67,7 @@ let tweetHeight = $ref(150);
|
|||
|
||||
const requestUrl = new URL(props.url);
|
||||
|
||||
if (requestUrl.hostname == 'twitter.com') {
|
||||
if (requestUrl.hostname === 'twitter.com') {
|
||||
const m = requestUrl.pathname.match(/^\/.+\/status(?:es)?\/(\d+)/);
|
||||
if (m) tweetId = m[1];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue