51 'patrolToken' => $user->getEditToken(
'patrol' ),
52 'watchToken' => $user->getEditToken(
'watch' ),
53 'csrfToken' => $user->getEditToken(),
55 $script =
'mw.user.tokens.set(' . $context->
encodeJson( $tokens ) .
');' .
"\n";
62 $options = $userOptionsLookup->getOptions( $user, UserOptionsLookup::EXCLUDE_DEFAULTS );
65 $this->
getHookRunner()->onResourceLoaderExcludeUserOptions( $keysToExclude, $context );
66 foreach ( $keysToExclude as $excludedKey ) {
67 unset( $options[ $excludedKey ] );
72 $script .=
'mw.user.options.set(' . $context->
encodeJson( $options ) .
');' .
"\n";