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

Optionally inject contentscript in iframes #6

Open
vitonsky opened this issue Jun 20, 2021 · 4 comments
Open

Optionally inject contentscript in iframes #6

vitonsky opened this issue Jun 20, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@vitonsky
Copy link
Collaborator

Optionally inject contentscript in iframes

It useful for tweets and other widgets on page

It may be enable by default

Manifest option "all_frames": true

@vitonsky vitonsky added the enhancement New feature or request label Jun 20, 2021
@vitonsky vitonsky pinned this issue Jul 30, 2021
@vitonsky
Copy link
Collaborator Author

It require method to detect main CS and CS in iframe for same tab.

Primary must execute commands, and sub scripts must only listen and obey.

Also it require synchronization of singleton instances like button for translate selected text which should be shown only in one place - main page or iframe.

p.s. Use match_about_blank for blank iframes: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts

@vitonsky
Copy link
Collaborator Author

If we will enable this feature, we have to:

  • Listen events for each contentscript instance on tab
  • Calculate one state for all instances, to send responses on requests (like popup requests "what's page translation state?", "what's page language?")
  • Exchange data between instances

We have to try find another way, like explore iframe as DOM node if possible, to keep only one contentscript instance

@vitonsky vitonsky modified the milestones: Release 5.0, Next release Apr 19, 2023
@zupd
Copy link

zupd commented Aug 14, 2023

It would be really nice to be able to translate pages in iframes too. Probably easier to explore the iframes as DOM nodes yes

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

No branches or pull requests

2 participants