3 ms·
JS snippet to sort and return Play Store app reviews by helpfulness: var nodes = [...document.querySelectorAll('\*[aria-label="Number of times this review wa
by hunterb123 4y ago
JS snippet to sort and return Play Store app reviews by helpfulness:
var nodes = [...document.querySelectorAll('\*[aria-label="Number of times this review was rated helpful"]')];
nodes.sort((a, b) => (parseInt(b.innerText) || 0) - (parseInt(a.innerText) || 0));
nodes.map(e => ([
parseInt(e.innerText) || 0,
e.parentNode.parentNode.parentNode.parentNode.parentNode.children[1].textContent.toString().trimStart(),
]));