mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-13 11:58:48 +00:00
invidious/invidious.php aktualisiert
Customise the links for - music.youtube - m.youtube - youtube
This commit is contained in:
parent
89fc76190e
commit
52418c88fc
1 changed files with 3 additions and 3 deletions
|
@ -96,9 +96,9 @@ function invidious_render(array &$b)
|
||||||
$b['html'] = preg_replace("~https?://(?:www\.)?youtube\.com/watch\?v=(.*?)~ism", $server . '/watch?v=$1', $b['html']);
|
$b['html'] = preg_replace("~https?://(?:www\.)?youtube\.com/watch\?v=(.*?)~ism", $server . '/watch?v=$1', $b['html']);
|
||||||
$b['html'] = preg_replace("~https?://(?:www\.)?youtube\.com/embed/(.*?)~ism", $server . '/embed/$1', $b['html']);
|
$b['html'] = preg_replace("~https?://(?:www\.)?youtube\.com/embed/(.*?)~ism", $server . '/embed/$1', $b['html']);
|
||||||
$b['html'] = preg_replace("~https?://(?:www\.)?youtube\.com/shorts/(.*?)~ism", $server . '/shorts/$1', $b['html']);
|
$b['html'] = preg_replace("~https?://(?:www\.)?youtube\.com/shorts/(.*?)~ism", $server . '/shorts/$1', $b['html']);
|
||||||
$b['html'] = preg_replace ("/https?:\/\/music.youtube.com\/(.*?)/ism", $server . '/watch?v=$1', $b['html']);
|
$b['html'] = preg_replace("~https?://(?:music\.)?youtube\.com/watch\?v=(.*?)~ism", $server . '/watch?v=$1', $b['html']);
|
||||||
$b['html'] = preg_replace ("/https?:\/\/m.youtube.com\/(.*?)/ism", $server . '/watch?v=$1', $b['html']);
|
$b['html'] = preg_replace("~https?://(?:m\.)?youtube\.com/watch\?v=(.*?)~ism", $server . '/watch?v=$1', $b['html']);
|
||||||
$b['html'] = preg_replace("/https?:\/\/youtu.be\/(.*?)/ism", $server . '/watch?v=$1', $b['html']);
|
$b['html'] = preg_replace("~https?://?youtube\.be/watch\?v=(.*?)~ism", $server . '/watch?v=$1', $b['html']);
|
||||||
|
|
||||||
if ($original != $b['html']) {
|
if ($original != $b['html']) {
|
||||||
$b['html'] .= '<hr><p><small>' . DI::l10n()->t('(Invidious addon enabled: YouTube links via %s)', $server) . '</small></p>';
|
$b['html'] .= '<hr><p><small>' . DI::l10n()->t('(Invidious addon enabled: YouTube links via %s)', $server) . '</small></p>';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue