I'm new in developing Chrome Extensions and a beginner in JavaScript. I need help in my chrome extension project.
Either if/else or a switch statement would be okay. I can't find a solution so far. I need my popup to show popup_1.html if the condition is true, and if it is false, then use popup_2.html
First, Set html file by setPopup
method
then open popup by openPopup();
method
const condition = true;
chrome.action.setPopup({ popup:condition ? "popup_1.html": "popup_2.html" });
chrome.action.openPopup();