const internals = {
promisesSupported: !!window.browser,
- injectedScript: false,
+ injectedScript: {},
port: null,
currentUrl: null,
const activeTabs = await internals.getActiveTabs();
internals.currentUrl = activeTabs[0].url;
- if (!internals.injectedScript) {
+ const id = activeTabs[0].id;
+ if (!internals.injectedScript[id]) {
const execution = await internals.getRoot().tabs.executeScript(
activeTabs[0].id,
{
file: "/build/content_script.js",
},
() => {
- internals.injectedScript = true;
+ internals.injectedScript[id] = true;
},
);