From 5fdd827a0cba5f8a9b5bdf45ebe4839ecbbd6354 Mon Sep 17 00:00:00 2001 From: Maxx Crawford Date: Wed, 4 Mar 2020 14:12:23 -0600 Subject: [PATCH] Fixed #608 - Added confirmation interstitial when removing sites from the first page of the doorhanger --- src/panel.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/panel.js b/src/panel.js index ff57a182..05ce41c9 100644 --- a/src/panel.js +++ b/src/panel.js @@ -181,7 +181,10 @@ const setCustomSiteButtonEvent = async (panelId) => { if (shouldShowRemoveSiteButton) { const removeSiteFromContainerLink = document.querySelector(".remove-site-from-container"); removeSiteFromContainerLink.addEventListener( - "click", async () => removeSiteFromContainer() + "click", async () => { + const activeRootDomain = await getActiveRootDomainFromBackground(); + buildRemoveSitePanel(activeRootDomain); + } ); return; } @@ -555,17 +558,6 @@ const buildAllowedSitesPanel = async(panelId) => { getLocalizedStrings(); }; -const removeSiteFromContainer = async () => { - const activeRootDomain = await getActiveRootDomainFromBackground(); - - await browser.runtime.sendMessage({ - message: "remove-domain-from-list", - removeDomain: activeRootDomain - }); - browser.tabs.reload(); - window.close(); -}; - const addSiteToContainer = async () => { const activeRootDomain = await getActiveRootDomainFromBackground(); const fbcStorage = await browser.storage.local.get();