'class' => ResourceLoaderWikiModule::class,
'styles' => [ 'MediaWiki:Filepage.css' ],
],
- 'user.groups' => [
- // Merged into 'user' since MediaWiki 1.28 - kept for back-compat
- 'dependencies' => 'user',
- 'targets' => [ 'desktop', 'mobile' ],
- ],
// Scripts managed by the current user (stored in their user space)
'user' => [ 'class' => ResourceLoaderUserModule::class ],
'remoteBasePath' => "$wgResourceBasePath/resources/src",
'packageFiles' => [
'mediawiki.util.js',
- [ 'name' => 'config.json', 'config' => [ 'FragmentMode' ] ],
+ [ 'name' => 'config.json', 'config' => [
+ 'FragmentMode',
+ 'LoadScript',
+ ] ],
],
'dependencies' => [
'jquery.accessKeyLabel',
],
'mediawiki.action.edit.preview' => [
'scripts' => 'resources/src/mediawiki.action/mediawiki.action.edit.preview.js',
+ 'styles' => 'resources/src/mediawiki.action/mediawiki.action.edit.preview.css',
'dependencies' => [
'jquery.spinner',
'jquery.textSelection',
'remoteBasePath' => "$wgResourceBasePath/resources/src/mediawiki.jqueryMsg",
'packageFiles' => [
'mediawiki.jqueryMsg.js',
- [ 'name' => 'parserDefaults.json', 'callback' => function ( ResourceLoaderContext $context ) {
+ [ 'name' => 'parserDefaults.json', 'callback' => function (
+ ResourceLoaderContext $context, Config $config
+ ) {
$tagData = Sanitizer::getRecognizedTagData();
$allowedHtmlElements = array_merge(
array_keys( $tagData['htmlpairs'] ),
);
$magicWords = [
- 'SITENAME' => $context->getConfig()->get( 'Sitename' ),
+ 'SITENAME' => $config->get( 'Sitename' ),
];
Hooks::run( 'ResourceLoaderJqueryMsgModuleMagicWords', [ $context, &$magicWords ] );
],
],
- /**
- * html5shiv
- *
- * This library is intended to run on older browsers
- * that MediaWiki no longer supports as Grade A, and
- * is not loaded through the normal module loading
- * system.
- */
+ // @todo FIXME: Remove 7 days after Ib0020b6bd0156 is deployed to all wikis.
'html5shiv' => [
'scripts' => [
'resources/lib/html5shiv/html5shiv.js'