Update externallinks.php

This commit is contained in:
simonpipe 2026-05-28 08:43:32 +02:00
parent a8a328c45b
commit 2d80976f06

View file

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