mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-30 19:16:39 +00:00
Disable reply links on mobile
Bug: T270088 Change-Id: I003b0c6adea8496c95596e40a2bf4bb63906a464
This commit is contained in:
parent
7706c391d2
commit
ccf6f33c40
|
@ -11,6 +11,7 @@ namespace MediaWiki\Extension\DiscussionTools;
|
|||
|
||||
use Action;
|
||||
use ConfigException;
|
||||
use ExtensionRegistry;
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MWExceptionHandler;
|
||||
use OutputPage;
|
||||
|
@ -69,6 +70,14 @@ class Hooks {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Don't show on mobile
|
||||
if ( ExtensionRegistry::getInstance()->isLoaded( 'MobileFrontend' ) ) {
|
||||
$mobFrontContext = MediaWikiServices::getInstance()->getService( 'MobileFrontend.Context' );
|
||||
if ( $mobFrontContext->shouldDisplayMobileView() ) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$title = $output->getTitle();
|
||||
// Only wikitext pages (e.g. not Flow boards)
|
||||
if ( $title->getContentModel() !== CONTENT_MODEL_WIKITEXT ) {
|
||||
|
|
Loading…
Reference in a new issue