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:
WMDE-Fisch 2020-11-12 14:28:14 +01:00 committed by Thiemo Kreuz (WMDE)
parent 010f7d4137
commit 3b3392a72f

View file

@ -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 ) {