Simplify: Use CSS in info.xml that always loads

This commit is contained in:
2026-04-16 14:24:32 +02:00
parent 2057cf8e98
commit 65795cfef5
3 changed files with 6 additions and 19 deletions

View File

@@ -8,9 +8,6 @@ use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
class Application extends App implements IBootstrap {
@@ -21,23 +18,8 @@ class Application extends App implements IBootstrap {
}
public function register(IRegistrationContext $context): void {
$context->registerEventListener(
TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS,
LoadScriptsListener::class
);
}
public function boot(IBootContext $context): void {
}
}
class LoadScriptsListener implements IEventListener {
public function handle(Event $event): void {
if (!$event instanceof TemplateResponse) {
return;
}
$event->addScript('minimalprofile');
}
}