diff --git a/nitter/nitter.php b/nitter/nitter.php index e9454c5d..ed587777 100644 --- a/nitter/nitter.php +++ b/nitter/nitter.php @@ -1,8 +1,8 @@ * * Copyright (c) 2020 Tobias Diekershoff @@ -55,7 +55,7 @@ function nitter_addon_admin(string &$o) } /* - * replace "twitter.com" with "nitter.net" + * replace "twitter.com" an "x.com" with "nitter.net" */ function nitter_render(array &$b) { @@ -69,6 +69,10 @@ function nitter_render(array &$b) if (strstr($b['html'], 'https://twitter.com')) { $b['html'] = str_replace('https://twitter.com', $nitter, $b['html']); $replaced = true; + } + if (strstr($b['html'], 'https://x.com')) { + $b['html'] = str_replace('https://x.com', $nitter, $b['html']); + $replaced = true; } if ($replaced) { $b['html'] .= '

' . DI::l10n()->t('(Nitter addon enabled: Twitter links via %s)', $nitter) . '

';