Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach additional injected content script functions #12

Open
vovimayhem opened this issue Aug 28, 2021 · 0 comments
Open

Attach additional injected content script functions #12

vovimayhem opened this issue Aug 28, 2021 · 0 comments

Comments

@vovimayhem
Copy link
Contributor

vovimayhem commented Aug 28, 2021

Currently, we inject a single function to the website when loaded as the Chrome Extension UI:

async function injectContentScriptWhenReady(tabId: number, changeInfo: TabChangeInfo, tab: Tab) {
let popUpWindowTabId = await readLocalStorage('popUpWindowTabId')
if (tabId != popUpWindowTabId || changeInfo.status !== 'complete') return
// Request the loaded app website to initiate the extension connection:
return chrome.scripting.executeScript({
target: { tabId: popUpWindowTabId },
func: windowMessagingSetup
})
}

Now we need to be able to attach additional functions, specially coming from the final chrome extension code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant