// background.js // Example: Listen for a message from the content script and respond browser.runtime.onMessage.addListener(function (message, sender, sendResponse) { if (message.action === 'promptUser') { // Send a message to the content script to prompt the user for input browser.tabs.query({ active: true, currentWindow: true }, function (tabs) { const activeTab = tabs[0]; browser.tabs.sendMessage(activeTab.id, { action: 'promptUser' }); }); } });