Scratchpad: calculate selection anchors manually in Firefox 34+