I'm creating an extension that opens a new active tab every time the user opens chrome. It works perfectly, but it also works when chrome is opened by an external link (like from discord, etc.).
Now the tab that is opened by the external link becomes inactive, because the extension opens a new active tab.
How do i detect how chrome is opened? So I can show the new tab when it's opened normally, and do nothing if it's opened by an external link to show the correct tab.
Or is there any other way that would result in the desired result?