Reputation: 65
I have a dependency, and I think the asynchronous loading of MediaWiki resources (jQuery specifically) is causing a problem. Is there a way to switch off this attribute in a MediaWiki setting?
Upvotes: 0
Views: 73
Reputation: 65
I solved this by copying the structure of a jQuery dependency in resources/Resources.php
with the resource I wanted to include and uploaded the .js
file to the specified folder.
Then added the following code to LocalSettings.php
:
$wgHooks['BeforePageDisplay'][] = function( OutputPage &$out, Skin &$skin ) {
$out->addModules('mymodule');
return true;
};
Upvotes: 1