From de77ea992e827f908a9951acbe3466fafb44f819 Mon Sep 17 00:00:00 2001 From: NikG Date: Mon, 24 Oct 2022 21:03:03 +0300 Subject: [PATCH] Remove unused code from ext.uls.interface.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the implementation of the “addEmptyState” method, a part of code was copied from the “addActionsMenuTrigger” method. This part is the rendering of the action menu items (Translate button, Open Language Settings button, etc) that is common for both the empty state and the actions menu. During this copy, two unused lines were also copied. These lines basically create the trigger for the actions menu (the “ellipsis” or “cog” icon button at the bottom right corner of non-empty ULS), which is not rendered for the ULS empty state. This patch removes these unused lines. Change-Id: I4776c2038cb6e1c74401c4caa6705e98181c6dca --- resources/js/ext.uls.interface.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/resources/js/ext.uls.interface.js b/resources/js/ext.uls.interface.js index 5ae9a8b4..4f98290a 100644 --- a/resources/js/ext.uls.interface.js +++ b/resources/js/ext.uls.interface.js @@ -149,8 +149,6 @@ var actionItemsRegistry = mw.uls.ActionsMenuItemsRegistry; actionItemsRegistry.register( languageSettingsMenuItem ); - var $actionsMenuTrigger = createActionsMenuTrigger(); - setActionsMenuTriggerIconClass( $actionsMenuTrigger, actionItemsRegistry.size() ); var $header = $( '

' ) .addClass( 'uls-empty-state__header' ) .text( $.i18n( 'ext-uls-empty-state-header' ) );