+ async initializeContentScript() {
+ internals.getRoot().browserAction.disable();
+ const activeTabs = await internals.getActiveTabs();
+
+ internals.currentUrl = activeTabs[0].url;
+ if (!internals.injectedScript) {
+ const execution = await internals.getRoot().tabs.executeScript(
+ activeTabs[0].id,
+ {
+ file: "/build/content_script.js",
+ },
+ () => {
+ internals.injectedScript = true;
+ },
+ );
+ } else {
+ internals.getRoot().tabs.connect(activeTabs[0].id)
+ }