From 1e13884a12b0cf38a033cc431e7a77133a6c56bd Mon Sep 17 00:00:00 2001 From: loma-one Date: Tue, 23 Jan 2024 08:15:24 +0100 Subject: [PATCH] nitter/nitter.php aktualisiert --- nitter/nitter.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nitter/nitter.php b/nitter/nitter.php index ed587777..1e2c59c3 100644 --- a/nitter/nitter.php +++ b/nitter/nitter.php @@ -1,7 +1,7 @@ * @@ -55,23 +55,23 @@ function nitter_addon_admin(string &$o) } /* - * replace "twitter.com" an "x.com" with "nitter.net" + * replace "twitter.com" and "x.com" with "nitter.net" */ function nitter_render(array &$b) { // this needs to be a system setting $replaced = false; $nitter = DI::config()->get('nitter', 'server', 'https://nitter.net'); - if (strstr($b['html'], 'https://mobile.twitter.com')) { - $b['html'] = str_replace('https://mobile.twitter.com', $nitter, $b['html']); + if (strstr($b['html'], 'https://mobile.twitter.com/')) { + $b['html'] = str_replace('https://mobile.twitter.com/', $nitter, $b['html']); $replaced = true; } - if (strstr($b['html'], 'https://twitter.com')) { - $b['html'] = str_replace('https://twitter.com', $nitter, $b['html']); + 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']); + if (strstr($b['html'], 'https://x.com/')) { + $b['html'] = str_replace('https://x.com/', $nitter, $b['html']); $replaced = true; } if ($replaced) {