<?php
$hookManager->register(
    function ($vars) {
        if (isset($vars['filename']) && $vars['filename'] != 'configservers' && (isset($_GET['action']) && $_GET['action'] != "manage" || !isset($_GET['id'])))
            return;

        $jsFile = ROOTDIR . DIRECTORY_SEPARATOR . "modules" . DIRECTORY_SEPARATOR . "addons" . DIRECTORY_SEPARATOR . "proxmoxAddon" . DIRECTORY_SEPARATOR . "app" . DIRECTORY_SEPARATOR . "UI" . DIRECTORY_SEPARATOR . "Admin" . DIRECTORY_SEPARATOR . "Templates" . DIRECTORY_SEPARATOR . "assets" . DIRECTORY_SEPARATOR . "js" . DIRECTORY_SEPARATOR . "hooks" . DIRECTORY_SEPARATOR . "server.js";
        if (!file_exists($jsFile)) {
            return;
        }

        return '<script type="text/javascript"> ' . file_get_contents($jsFile) . '</script>';
    }, 2);