Alternative implementation of `selectedText`.

It works with Safari, Chrome and whatnot, in theory, with any application. 
Quick and dirty hack. I'd like to do it with asynchronous events but don't know how yet.