ve-cite: Remove redundant check for visualeditor-cite-tool-definition.json

The server always defines this message as `cite-tool-definition.json`
in CiteVisualEditorModule.php, including a transparent fallback that
defines it with the content of `visualeditor-cite-tool-definition.json`.

Change-Id: I27426ed1947c1665e5284e64ec1946b1abeff7d1
This commit is contained in:
Timo Tijhof 2021-11-10 20:43:12 +00:00 committed by WMDE-Fisch
parent db02766664
commit 471e73a7db

View file

@ -91,12 +91,6 @@
// Must use mw.message to avoid JSON being parsed as Wikitext
tools = JSON.parse( mw.message( 'cite-tool-definition.json' ).plain() );
} catch ( e ) {}
if ( !tools ) {
try {
// Must use mw.message to avoid JSON being parsed as Wikitext
tools = JSON.parse( mw.message( 'visualeditor-cite-tool-definition.json' ).plain() );
} catch ( e ) {}
}
// Limit and expose
ve.ui.mwCitationTools = ( tools || [] ).slice( 0, limit );