News for hackers. Stuff that matters.
Re:I wish I could read Wikipedia like this by neilk on Thursday April 17, 2014 @04:42AM (#7602560)
The OP's design for it is much nicer.

Navigation popups have been around since 2005, and while in some ways better than the OP's design (pictures!) this is useful enough to test it as default behavior.

Hover doesn't work on mobile, so perhaps they should appear if you click and hold for a few seconds.

Re:I wish I could read Wikipedia like this by 3rd3 on Thursday April 17, 2014 @06:34AM (#7602823)
Implementing it in HTML/CSS/JS certainly poses an interesting problem because, as far as I know, one cannot directly access individual, dynamically broken lines of text. One would probably have to wrap each word in a container and keep track of the absolute positions.
Re:I wish I could read Wikipedia like this by assaflavie on Thursday April 17, 2014 @06:55AM (#7602859)
Very true. I got a rough POC of this, implemented using the technique in this answer: http://stackoverflow.com/a/22816419/11208

(just with divs instead of images)

It's very brittle though. It relies on knowing the line-height, calculating the line in which the highlighted word sits, accounting for the existence of vertical scroll-bars... not trivial.

Re:I wish I could read Wikipedia like this by 3rd3 on Thursday April 17, 2014 @07:39AM (#7602978)
Ah, that was surprisingly easy: http://jsfiddle.net/5p92U/

Or am I missing something?

Edit: Yes, I do. It does not work together with images on the right side: http://jsfiddle.net/Nup2F/

Re:I wish I could read Wikipedia like this by Adirael on Thursday April 17, 2014 @06:57AM (#7602868)
You can use getSelection() to do that, but it doesn't work everywhere. [0] [1]

[0] https://stackoverflow.com/questions/7563169/detect-which-wor...

[1] http://jsfiddle.net/Vap7C/15/