artemave / translate_onhover

Browser translation extension
https://chrome.google.com/webstore/detail/aggiiclaiamajehmlfpkjmlbadmkledi
205 stars 61 forks source link

Cannot work within iframe & Dynamic content through extension or AJAX #110

Open akash-ooo opened 8 months ago

akash-ooo commented 8 months ago

Your extension really helps me a lot in my daily life. I want to inform you about one small issue and request to fix it. Imagine I am using a third-party extension called 'Sider AI'. This extension creates dynamic popups when I ask it any question. Inside this newly created dynamic content, TranOver does not work. It also doesn't work inside iframes.

If you need more information, please let me know. I am ready to share.

artemave commented 8 months ago

Well it's hard to know why slider ai doesn't work, but iframes are supposed to be working. Could you give give an example?

akash-ooo commented 8 months ago

It's also not work with Google Gemini where other extension work fine.

Here an another example:

Screenshot_1 If you need more I will give you.

akash-ooo commented 8 months ago

Here is a simple tips you can easily apply: use JavaScript MutationObserver to observe dynamic changes in the entire page (DOM), then initialize the extension after any new change.

artemave commented 8 months ago

Shadow dom. I am not sure external scripts can "penetrate" it. But I might be wrong.

Here are some simple tips you can easily apply: use JavaScript MutationObserver to observe dynamic changes in the entire page (DOM), then initialize the extension after any new change.

Sounds like you know what to do. I'd welcome your pr.

akash-ooo commented 8 months ago

You're correct, brother. I know the solution to the problem, but the issue is I've never worked on extensions before. So, I'm unable to contribute to this project now.

akash-ooo commented 8 months ago

You can provide me with the steps for the task, and in the future, I'll attempt to solve it.