Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

[feature request] iframe support #29

Closed
jpc-ae opened this issue Jan 2, 2017 · 11 comments · Fixed by #417
Closed

[feature request] iframe support #29

jpc-ae opened this issue Jan 2, 2017 · 11 comments · Fixed by #417

Comments

@jpc-ae
Copy link

jpc-ae commented Jan 2, 2017

There are several sites, like google translator toolkit, where different parts of the page are broken up into iframes. It would be nice to be able to check text in all the frames on sites that still use them.

@FooSoft
Copy link
Owner

FooSoft commented Jan 2, 2017

Could you link me to specific page(s) that does not work?

@jpc-ae
Copy link
Author

jpc-ae commented Jan 2, 2017

Well, it might be a niche use-case, but if you go to https://translate.google.com/toolkit/ and upload some Japanese text to work on, then open it, the left pane in the workbench (the opened file) isn't being parsed

@siikamiika
Copy link
Collaborator

Twitter widget: http://dic.nicovideo.jp/

@FooSoft
Copy link
Owner

FooSoft commented Aug 26, 2017

So this is still appears to be a problem for the twitter widget, but the latest release solves IFRAME issues in general. I think the problem is that the Twitter IFRAME is procedurally generated so that the content script is not injected into it? Need to investigate this further.

@FooSoft FooSoft reopened this Aug 26, 2017
@seanblue
Copy link

seanblue commented Nov 3, 2019

I'm still seeing some iframe issues. Take this Amazon page. Scanning the text in the description (starting with 1000年後の日本。) don't show the popup.

I've seen the popup not work on other sites, but I'm not sure if they were iframe issues and I don't remember the sites off hand.

@siikamiika
Copy link
Collaborator

@seanblue For me the popup shows up, but it's almost unusable because the iframe is so small. It would be possible to open a popup on the root page with the framework that was added in recursive popups (#185), but there could be some problems positioning the popup according to #185 (comment).

@toasted-nutbread
Copy link
Collaborator

I have looked into supporting iframes after the recursive popups were added, and the only issue that really prevents it is that there is no way to determine which <iframe> corresponds to which frameId. This makes it very difficult to determine what the correct offset for the popup should be on the root page. I suppose it would be possible to use "Full width" display mode to avoid this issue, but I think it's worth trying to exhaust any other potential methods of determining popup position before it comes to this.

@JiaChen-Zeng
Copy link

I seem to have the same problem.
I am using a user script to make novel websites texts appear vertical, but with it when scanning text yomichan doesn't pop up.
Inspecting it, I think it is because the texts are displayed in an iframe laid over the original content.

image

@toasted-nutbread
Copy link
Collaborator

Looking a bit more into this: the issue I mentioned in my previous comment in this thread is still present, but it may be worth it to support the "Full width" display mode as a first step.

However, another issue has presented itself: iframes don't load in a specific order, and they can also load before the root frame has completed loading. The result of this is that the proxy communication port that is (attempted to be) opened will occasionally fail because the root frame loads after the iframe. This is another issue which will need to be resolved before any sort of iframes support can work.

@toasted-nutbread
Copy link
Collaborator

FYI @m-azuma: A change has been made to the development branch which makes the user script you mentioned in #29 (comment) work with Yomichan: cc989f4. This change should be included in a future release.

@siikamiika
Copy link
Collaborator

@seanblue with #417 merged, it will soon be possible to show popups created with iframe content on the root frame so that the popup size is not limited by the iframe size. It's found at "Show iframe popups in root frame" under General Options when advanced options are enabled.

This option won't work when the iframe is in fullscreen mode, and there's #432 to track a workaround for it.

Another issue with the popup not showing up at all was already fixed earlier in cc989f4.

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

Successfully merging a pull request may close this issue.

6 participants