(()=>{chrome.runtime.onInstalled.addListener((()=>{}));let e=!1;function r(){const e=document.getElementById("font-selector-root"),r=document.getElementById("font-tester-script");e&&e.remove(),r&&r.remove()}chrome.action.onClicked.addListener((t=>{e?chrome.scripting.executeScript({target:{tabId:t.id},function:r},(()=>{chrome.runtime.lastError?console.error(chrome.runtime.lastError.message):e=!1})):chrome.scripting.executeScript({target:{tabId:t.id},files:["content.js"]},(r=>{chrome.runtime.lastError?console.error(chrome.runtime.lastError.message):e=!0}))})),chrome.runtime.onMessage.addListener(((t,o,n)=>{"widgetClosed"===t.action&&(e=!1,chrome.scripting.executeScript({target:{tabId:o.tab?.id},function:r},(()=>{chrome.runtime.lastError?console.error(chrome.runtime.lastError.message):e=!1})))}))})();