21 lines
No EOL
637 B
PHP
21 lines
No EOL
637 B
PHP
<?php
|
|
// Mastodonapi extension, https://codeberg.org/simonpipe/yellow-externallinks
|
|
|
|
class YellowMastodonapi {
|
|
const VERSION = "0.9.0";
|
|
public $yellow; // access to API
|
|
|
|
// Initialize extension
|
|
public function onLoad($yellow) {
|
|
$this->yellow = $yellow;
|
|
}
|
|
|
|
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";
|
|
}
|
|
return $output;
|
|
}
|
|
} |