mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-14 19:24:42 +00:00
Use OutputPage from diff engine instead of global context
There seems to be no crucial reason why this was done differently. Change-Id: Ib7ed261970bb9e3301f7657af6645a8373e39ddc
This commit is contained in:
parent
010f7d4137
commit
3b3392a72f
|
@ -8,7 +8,6 @@ use Html;
|
|||
use MediaWiki\MediaWikiServices;
|
||||
use Message;
|
||||
use OOUI\ButtonWidget;
|
||||
use RequestContext;
|
||||
use User;
|
||||
|
||||
/**
|
||||
|
@ -86,7 +85,7 @@ class RevisionSliderHooks {
|
|||
|
||||
$autoExpand = $userOptionsLookup->getBoolOption( $user, 'userjs-revslider-autoexpand' );
|
||||
|
||||
$out = RequestContext::getMain()->getOutput();
|
||||
$out = $diff->getOutput();
|
||||
// Load styles on page load to avoid FOUC
|
||||
$out->addModuleStyles( 'ext.RevisionSlider.lazyCss' );
|
||||
if ( $autoExpand ) {
|
||||
|
|
Loading…
Reference in a new issue