Compare commits
4 commits
694af0daeb
...
9c6a86ffaa
Author | SHA1 | Date | |
---|---|---|---|
Michael | 9c6a86ffaa | ||
Hypolite Petovan | 38466415b3 | ||
loma-one | 3bf547ee6e | ||
loma-one | 9627e95b19 |
|
@ -9,12 +9,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Cache\Enum\Duration;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\DI;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
|
||||
function curweather_install()
|
||||
{
|
||||
|
@ -127,7 +125,7 @@ function curweather_network_mod_init(string &$body)
|
|||
$t = Renderer::getMarkupTemplate("widget.tpl", "addon/curweather/" );
|
||||
$curweather = Renderer::replaceMacros($t, [
|
||||
'$title' => DI::l10n()->t("Current Weather"),
|
||||
'$icon' => ProxyUtils::proxifyUrl('http://openweathermap.org/img/w/'.$res['icon'].'.png'),
|
||||
'$icon' => 'http://openweathermap.org/img/w/'.$res['icon'].'.png',
|
||||
'$city' => $res['city'],
|
||||
'$lon' => $res['lon'],
|
||||
'$lat' => $res['lat'],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
/*
|
||||
* Name: invidious
|
||||
* Description: Replaces links to youtube.com to an invidious instance in all displays of postings on a node.
|
||||
* Version: 0.3
|
||||
* Version: 0.4
|
||||
* Author: Matthias Ebers <https://loma.ml/profile/feb>
|
||||
* Author: Michael Vogel <https://pirati.ca/profile/heluecht>
|
||||
* Status: Unsupported
|
||||
|
@ -93,9 +93,9 @@ function invidious_render(array &$b)
|
|||
$original = $b['html'];
|
||||
$server = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'invidious', 'server', DI::config()->get('invidious', 'server', INVIDIOUS_DEFAULT));
|
||||
|
||||
$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\/shorts\/(.*?)/ism", $server . '/shorts/$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/shorts/(.*?)~ism", $server . '/shorts/$1', $b['html']);
|
||||
$b['html'] = preg_replace("/https?:\/\/youtu.be\/(.*?)/ism", $server . '/watch?v=$1', $b['html']);
|
||||
|
||||
if ($original != $b['html']) {
|
||||
|
|
|
@ -15,7 +15,6 @@ use Friendica\Core\Cache\Enum\Duration;
|
|||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\DI;
|
||||
use Friendica\Util\Proxy as ProxyUtils;
|
||||
|
||||
function mastodoncustomemojis_install()
|
||||
{
|
||||
|
@ -88,7 +87,7 @@ function mastodoncustomemojis_fetch_custom_emojis_for_url($api_base_url)
|
|||
foreach ($emojis_array as $emoji) {
|
||||
if (!empty($emoji['shortcode']) && !empty($emoji['static_url'])) {
|
||||
$return['texts'][] = ':' . $emoji['shortcode'] . ':';
|
||||
$return['icons'][] = '<img class="emoji mastodon" src="' . ProxyUtils::proxifyUrl($emoji['static_url']) . '" alt=":' . $emoji['shortcode'] . ':" title=":' . $emoji['shortcode'] . ':"/>';
|
||||
$return['icons'][] = '<img class="emoji mastodon" src="' . $emoji['static_url'] . '" alt=":' . $emoji['shortcode'] . ':" title=":' . $emoji['shortcode'] . ':"/>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue