Remove out of date invalid link alert

The alert text is now added as a red message under the form field
for the link target text, and there's no need to have an additional
alert because the dialog's insert-link button can't be clicked
while there's an invalid internal link anyway.

Bug: T298596
Change-Id: Ib536b51baae24a6cfe7a7426d039fdf11c4cb150
This commit is contained in:
Sam Wilson 2022-02-11 15:49:12 +08:00
parent 8e05e5d8d0
commit 5c9d867847

View file

@ -176,15 +176,6 @@
}
var insertText = '';
if ( insertLinkLinkTypeField.isInternal() ) {
// FIXME: Exactly how fragile is this?
// eslint-disable-next-line no-jquery/no-sizzle
if ( $( '#wikieditor-toolbar-link-int-target-status-invalid' ).is( ':visible' ) ) {
// Refuse to add links to invalid titles
// eslint-disable-next-line no-alert
alert( mw.msg( 'wikieditor-toolbar-tool-link-int-invalid' ) );
return;
}
if ( target === text || !text.length ) {
insertText = '[[' + target + ']]';
} else {