Update externallinks.php

This commit is contained in:
simonpipe 2026-05-28 08:40:59 +02:00
parent 0b391bf37f
commit a8a328c45b

View file

@ -1,5 +1,5 @@
<?php
// Mastodonapi extension, https://codeberg.org/simonpipe/yellow-externallinks
// External links in a new tab, https://codeberg.org/simonpipe/yellow-externallinks
class YellowExternalLinks {
const VERSION = "0.9.0";
@ -13,8 +13,9 @@ class YellowExternalLinks {
public function onExtra($name) {
$output = "";
if ($name == "header") {
$location = $this->yellow->config->get("serverBase")."/system/plugins/externallinks/";
$output .= "<script type=\"text/javascript\" src=\"{$location}externallinks.js\" async></script>\n";
// Passt den Pfad dynamisch an das neue workers-Verzeichnis an
$location = $this->yellow->config->get("serverBase").$this->yellow->config->get("workerDir")."externallinks.js";
$output .= "<script type=\"text/javascript\" src=\"{$location}\" async></script>\n";
}
return $output;
}