From 8b7e293eaecb45918fb024eebb091017a0cdb695 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Tue, 10 Sep 2019 21:32:07 -0400 Subject: Remove profile without popup when shift key is pressed Also removes duplicate click listener. --- ext/bg/js/settings-profiles.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ext/bg') diff --git a/ext/bg/js/settings-profiles.js b/ext/bg/js/settings-profiles.js index 6e0e9953..6ff9dda5 100644 --- a/ext/bg/js/settings-profiles.js +++ b/ext/bg/js/settings-profiles.js @@ -173,7 +173,11 @@ async function onProfileAdd() { await apiOptionsSave(); } -async function onProfileRemove() { +async function onProfileRemove(e) { + if (e.shiftKey) { + return await onProfileRemoveConfirm(); + } + const optionsFull = await apiOptionsGetFull(); if (optionsFull.profiles.length <= 1) { return; -- cgit v1.2.3