arianneorpilla / jidoujisho

A full-featured immersion language learning suite for mobile.
GNU General Public License v3.0
904 stars 58 forks source link

Browser: doesn't detect text inside an iframe #283

Open TriDyE opened 1 year ago

TriDyE commented 1 year ago

Good afternoon:

A friend of mine is preparing a web similar to many others multimedia server like Plex or Netflix, but for manga.

It includes the capability to read .html generated using Mokuro and the web will track your current progress, recommend similar manga, track times of reading, ...

When I try to open the web using jidoujisho, your app is not able to read the text inside iframes and because of that, the dictionary doesn't pop up. I can select the text, but the dictionary doesn't work.

The developer told me that the problem is just that: jidoujisho's browser cannot detect text inside iframes.

Can you check if is possible to add the option to read text inside iframes using the browser of jidoujisho?

Thanks!!

arianneorpilla commented 1 year ago

You'd just have to edit the JavaScript that I inject into the Browser to make this work. I add a click event handler to the body of the document of a webpage. You'd just have to adjust this to make it so that it works for iframes, though I imagine if there are unrelated CORS issues, that will add some extra complexity to the fix.

arianneorpilla commented 1 year ago

Just for testing purposes, could you please supply a URL that I can use to test against this to make it easier for me to test a fix in the future?

TriDyE commented 1 year ago

https://github.com/lrorpilla/jidoujisho/assets/102191690/32218730-b546-4092-a96c-aad38faf6f90

Good morning:

I don't know any URL that uses iframes right now, sorry. Only the web of my friend.

Also I was talking with my friend and he told me that you only need to create a web and add this to create an iframe and test: