Embed Tweets in an iframe - https://tf.rita.moe

Support x.com URLs

Changed files
+2 -2
+2 -2
show.html
···
let formattedDate = 'Unknown date'
const conversation = params['conversation']
-
const m = url.match(/^(https?:)?\/\/(www\.)?twitter\.com\/([^/]+)\//)
+
const m = url.match(/^(?:https?:)?\/\/(?:www\.)?(?:twitter|x)\.com\/([^/]+)\//)
if (m && !authorUsername) {
-
authorUsername = m[3]
+
authorUsername = m[1]
}
if (authorUsername && authorUsername.substr(0, 1) !== '@') {