I opened an issue for Just Read here: https://github.com/ZachSaucier/Just-Read/issues/24
Wanted to know if this is a known issue with extensions that change the page like read mode ones?
If so, any workaround?
Thanks!
Hi, creator of Just Read here.
This is likely caused by Just Read making use of a dynamically created iframe in order to display the customized format, which I doubt Vimium is listening for in order to apply additional event listeners (for the new iframe).
In #2190 @smblott-github mentioned Chrome doesn't let extensions work inside chrome-extension:
frames.
Just Read however runs in:
iframe.simple-article>html>body>.simple-container
Only reference I found to a chrome-extension
was the href to a stylesheet.
Vimium indeed does not work in this context, however, unlike the other extension I used before (Clearly) once you Leave the Just Read Reading mode Vimium does work, while with Clearly it'd break until page refresh.
As we can see in our List of Frames Vimium indeed has no access to "Just Read". More about what that means here
I just spent a while trying to get the Vimium main script to re-run while Just Read was active to see if that would work, however I couldn't find a way to do so. Not saying it doesn't exist, but my extension knowledge is not even skin deep so I haven't figured it out yet. @ZachSaucier do you care to give that a try? You might understand how that sorcery happens.
It looks like this one is running at the URL about:blank
:
Looks like that might be another place where Chrome doesn't run extensions. In any case, I tried it and can confirm that Vimium's content scripts are not being run for the iframe.
@smblott-github the iframe doesn't exist at first, it gets added once you press the hotkey/click the icon. Does Vimium have a watcher for new elements?
EDIT: Also out of curiosity how did you try to run it. I investigated a bit but couldn't figure it out. I Want to know in case something like this pops up in the future.
Once the iframe is added and the DOM updates (it takes a little time), the iframe's content should be accessible within var iframeDocument = document.querySelectorAll("iframe")[i].contentWindow.document;
where i
is the number for Just Read. If vimium has a listener for appended elements it should fire once the iframe is all loaded.
Vimium could do some analysis of the content within the iframe do judge whether or not it needs to apply itself to that content.
E.g....
There's a slight interoperability issue. Vimium closes the Vomnibar on the keydown
event for Escape
. Just Read seems to use the keyup
event. So Escape
closes the Vomnibar and Just Read.
@smblott-github Sorry to bother you, do you have an estimate of when this will get released? I use Just Read daily, I'm extremely exited at the prospect of being able to use Vimium in it.
Most helpful comment
2379 seems to fix this.
E.g....
There's a slight interoperability issue. Vimium closes the Vomnibar on the
keydown
event forEscape
. Just Read seems to use thekeyup
event. SoEscape
closes the Vomnibar and Just Read.