- if (strstr($o['html'], 'https://twitter.com')) {
- $o['html'] = str_replace('https://twitter.com', $nitter, $o['html']);
- $o['html'] .= '<hr><p>' . DI::l10n()->t('Links to Twitter in this posting were replaced by links to the Nitter instance at %s', $nitter) . '</p>';
+ 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']);
+ $replaced = true;
+ }
+ if ($replaced) {
+ $b['html'] .= '<hr><p><small>' . DI::l10n()->t('(Nitter addon enabled: Twitter links via %s)', $nitter) . '</small></p>';