this tampermonkey script toggles contentEditable
in that mode you navigate to the desired text and select it with keyboard - as in standard text editor
// ==UserScript==
// @name Toggle ContentEditable
// @namespace http://tampermonkey.net/
// @version 0.1
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var range;
document.addEventListener('keydown', function(e) {
if (e.keyCode == 12 && e.ctrlKey && e.altKey) // CTRL + ALT + NumPadCenter
{
if (!document.body.getAttribute("contenteditable"))
{
document.body.setAttribute("contenteditable", "true");
var selection = window.getSelection();
selection.removeAllRanges();
if (!range) range = document.createRange();
var el = document.elementFromPoint(window.innerWidth/2, window.innerHeight/2);
if (!el) el = document.body;
range.setStart(el, 0);
range.collapse(true);
selection.addRange(range);
}
}
else if (e.keyCode == 27 // ESC
&& document.body.getAttribute("contenteditable"))
document.body.removeAttribute("contenteditable");
});
})();
I use it when I read books in foreign languages and have to frequently copy-paste some words to the dictionary
Ctrl+Alt+NumPadCenter turns it ON
ESC turns it OFF (i.e. returns to regular browsing)
To change key combinations to whatever you prefer, edit lines that have respective comments next to them.
When you turn in ON, script places caret at the beginning of the element (usually paragraph) that is in the center of the browser window.
Googling led me to this page and the solutions proposed seemed overkill, so here it is.