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

Add Chrome MV3 build target #137

Merged

Conversation

kzar
Copy link
Contributor

@kzar kzar commented Sep 5, 2022

Add a Chrome MV3 build target, that produces a main-world content
script ready for injection. Since there is not yet a way to pass
arguments to chrome.scripting.registerContentScript[1] registered
content scripts, generate a secret in the main-world (before the
website's own scripts have a chance to run) and emit that as an event
for our content script. That way, the main-world script still has a
way to share a secret with the content script for messaging.

Note: The registerContentScript does not yet allow about:blank frames
to be targeted[2].

1 - https://developer.chrome.com/docs/extensions/reference/scripting/#method-registerContentScripts
2 - https://crbug.com/1360392

@kzar kzar force-pushed the mv3-script-injection-register branch 6 times, most recently from df0914a to 98f1042 Compare September 6, 2022 13:18
@kzar kzar force-pushed the mv3-script-injection-register branch from 98f1042 to c232072 Compare September 7, 2022 11:09
Add a Chrome MV3 build target, that produces a main-world content
script ready for injection. Since there is not yet a way to pass
arguments to chrome.scripting.registerContentScript[1] registered
content scripts, generate a secret in the main-world (before the
website's own scripts have a chance to run) and emit that as an event
for our content script. That way, the main-world script still has a
way to share a secret with the content script for messaging.

Note: The registerContentScript does not yet allow about:blank frames
      to be targeted[2].

1 - https://developer.chrome.com/docs/extensions/reference/scripting/#method-registerContentScripts
2 - https://crbug.com/1360392
@kzar kzar force-pushed the mv3-script-injection-register branch from c232072 to ce8ed92 Compare September 7, 2022 11:12
@jonathanKingston jonathanKingston merged commit ab8006e into duckduckgo:main Sep 7, 2022
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

Successfully merging this pull request may close these issues.

2 participants