@codepo8 's advice at #HalfStackConf to use Dev Tools to edit annoying webpages into something more acceptable has improved my experience of the internet 120% (science). #UX
@aquarial @codepo8 I'm just straight-using the Dev Tools out of the box because most of the annoying sites I'm only visiting once. However there is the idea of snippets that could form a Greasemonkey successor. https://developer.chrome.com/docs/devtools/javascript/snippets/ https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/javascript/snippets
function get_by_xpath(path, start) {
if (start == undefined || start == null) { start = document; }
let res = [];
let iter = document.evaluate(path, start, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
while (true) {
let i = iter.iterateNext();
if (i == null) { break; }
res.push(i);
}
return res;
}