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();