Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save TheUltDev/1a989aa38a41ab72d46296353b9eeffd to your computer and use it in GitHub Desktop.
Save TheUltDev/1a989aa38a41ab72d46296353b9eeffd to your computer and use it in GitHub Desktop.
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(),
]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment