Add support for new Twitter (X) links
authorMarcel Werk <burntime@woltlab.com>
Mon, 21 Aug 2023 09:51:26 +0000 (11:51 +0200)
committerMarcel Werk <burntime@woltlab.com>
Mon, 21 Aug 2023 09:51:26 +0000 (11:51 +0200)
com.woltlab.wcf/mediaProvider.xml

index 2ccff58bd878b737429ffce9abe8ea6add694ee8..aa83069f0739607a2c9bcbb0b72288dd38e67cdd 100644 (file)
@@ -66,7 +66,8 @@ https?://www.twitch.tv/[a-zA-Z0-9]+/v/(?<VIDEO>[0-9]+)]]></regex>
                </provider>
                <provider name="twitter-tweet">
                        <title>Twitter Tweet</title>
-                       <regex><![CDATA[https://twitter.com/(?<USERNAME>[0-9a-zA-Z_]+)/status/(?<ID>[0-9]+)]]></regex>
+                       <regex><![CDATA[https://twitter.com/(?<USERNAME>[0-9a-zA-Z_]+)/status/(?<ID>[0-9]+)
+https://x.com/(?<USERNAME>[0-9a-zA-Z_]+)/status/(?<ID>[0-9]+)]]></regex>
                        <html><![CDATA[<div data-wsc-twitter-tweet="{$ID}"><a href="https://twitter.com/{$USERNAME}/status/{$ID}/" class="externalURL" rel="nofollow ugc">https://twitter.com/{$USERNAME}/status/{$ID}/</a></div>
 <script>require(["WoltLabSuite/Core/Ui/Message/TwitterEmbed"],function(t){t.embedAll()});</script>]]></html>
                </provider>