getUser(); $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); if ($user->isRegistered() && $permissionManager->userHasRight($user, 'chatcomplete')) { $outputPage->addModules(["ext.isekai.chatcomplete.launcher"]); } } public static function onResourceLoaderGetConfigVars(array &$vars, string $skin, Config $config){ $vars['wgIsekaiChatCompleteFrontendUrl'] = $config->get('IsekaiChatCompleteFrontendUrl'); } }