im new in nextcloud
im stuck 3 days in adding a tab in sharing box next to activity. now my problem is i want add my script.js in my Listener based on document. i copied the sample codes from checksum app in nextcloud appstore. my weird bug is checksum
listener is triggered but my listener wont be trigged! listener
class and application
class are same for both of them just with different app name and their own js file
class LoadSidebarListener implements IEventListener {
public function handle(Event $event): void {
if (!($event instanceof LoadSidebar)) {
return;
}
Util::addScript(Application::APP_ID, 'myage.main');
}
}
and register it in Applicaton.php:
class Application extends App implements IBootstrap {
public const APP_ID = 'myage';
public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams);
}
public function register(IRegistrationContext $context): void {
// Load scripts for sidebar.
$context->registerEventListener(
LoadSidebar::class,
LoadSidebarListener::class
);
}
public function boot(IBootContext $context): void {
}}
https://stackoverflow.com/questions/71852834/not-triggering-custom-listener-for-adding-script-in-nextcloud