meetDeveloper / Dictionary-Anywhere

Dictionary extension that helps you stay focused on what you are reading by eliminating the need to search for meaning.
GNU General Public License v3.0
253 stars 53 forks source link

Doesn't work in the www.zerohedge.com comments section #10

Open nadesco opened 4 years ago

nadesco commented 4 years ago

Great little addon but it doesn't work properly on this site: www.zerohedge.com . The pop-up window appears when any word is double clicked within the article itself but it doesn't show in the comments section for some reason.

meetDeveloper commented 4 years ago

@nadesco I did a preliminary analysis, it looks like they stop the click event to bubble up, and so my extension is unable to capture that some click happened, and so is not showing any meaning.

meetDeveloper commented 4 years ago

I have to look more into it, I tried capturing event even that does not work, somehow.

chriscz commented 4 years ago

@meetDeveloper I recall once having a similar issue in a web-app and I opted for a solution that finds the element at the coordinates under the cursor click. This may not be an efficient solution if it's the primary one, however if you use it as fallback (i.e. no event after 20ms of clicking) it may work.

meetDeveloper commented 4 years ago

@chriscz How would I know that person has clicked somewhere if that event is not bubbled up?

meetDeveloper commented 4 years ago

@chriscz Sorry for delay in reply, life got me busy these months.

chriscz commented 4 years ago

No problem. That's how it goes! :sweat_smile: From what I recall you could either add an overlay or catch the mouseup event. These two SO Q's have some interesting approaches to bypassing or catching those:

If you did this and you discover the coordinates you can find the element at that coordinate

I hope it helps!

gomain commented 3 years ago

Also not working in leanpub.com read-online.

Go to https://leanpub.com/manual/read_full then follow the links to buy the book. Do buy the book (at $0.00) — there is no bug in the Free to Read Online option!.

meetDeveloper commented 3 years ago

So found the issue, the comment section of zerohedge is in an iframe and my javasript runs in context of the page and so it does not catch click events that are done in the iframe. @chriscz @gomain

nadesco commented 3 years ago

Thanks for looking into that. It still doesn't work in the comments section unfortunately. I have uBlock Origin, NoScript (frames enabled) and Little Snitch installed and thought that a setting in one of those might have stopped the add-on from working properly, so I disabled all of them and tried again. There was no change but if it works on your machine then it might be a different setting or app that's causing the popup window not to show on mine. The add-on still works as it should within the article. Version 1.0.10

meetDeveloper commented 3 years ago

@nadesco I have not fixed this issue yet. 😅 I just found out the what is causing the issue. Need to spend some time thinking about solution.

SethFalco commented 1 year ago

Having the same issue as this. Perhaps the issue title should be renamed to refer to the actual problem?

Meanwhile, learning a course on edX and unfortunate I this extension doesn't return definitions of terms used in course material because it's in an iframe. :c