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