From 471e73a7dbc64b944e2f336a5d759ad2d2d49daf Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 10 Nov 2021 20:43:12 +0000 Subject: [PATCH] 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 --- modules/ve-cite/ve.ui.MWReference.init.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/ve-cite/ve.ui.MWReference.init.js b/modules/ve-cite/ve.ui.MWReference.init.js index 3a900e5a7..7b964b53b 100644 --- a/modules/ve-cite/ve.ui.MWReference.init.js +++ b/modules/ve-cite/ve.ui.MWReference.init.js @@ -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 );