Tighten conditions for incompatible skin warnings

Previously we could log a warning if the user had the editor enabled,
but the page did not support being edited as wikitext.

Bug: T312632
Bug: T314171
Change-Id: I647cb057ed44c155b4eba1b728d6908f8a7abb69
This commit is contained in:
Bartosz Dziewoński 2022-07-30 15:31:29 +02:00
parent fb8a9396ed
commit b5cdd70508

View file

@ -1448,7 +1448,7 @@
initialWikitext = $( '#wpTextbox1' ).textSelection( 'getContents' );
}
if ( init.isAvailable && pageCanLoadEditor && !requiredSkinElements ) {
if ( ( init.isVisualAvailable || init.isWikitextAvailable ) && pageCanLoadEditor && !requiredSkinElements ) {
mw.log.warn(
'Your skin is incompatible with VisualEditor. ' +
'See https://www.mediawiki.org/wiki/Extension:VisualEditor/Skin_requirements for the requirements.'