How to add external <script> to <head> section for all mediawiki pages?
问题 I want add external script to head section for all pages in mediawiki. Function onBeforePageDisplay callback from BeforePageDisplay hook: //LocalSettings.php ... # Assign my functions to hook $wgHooks['BeforePageDisplay'][] ='onBeforePageDisplay'; function onBeforePageDisplay( OutputPage &$out, Skin &$skin ) { mw.loader.load('http://static.wowhead.com/widgets/power.js', 'text/javascript'); $out->addModules( 'mw.loader' ); return true; }; In this function i want to add <script type="text