@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
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; }
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;
}