Skip to content

Instantly share code, notes, and snippets.

@oshliaer
Created October 12, 2021 03:41
Show Gist options
  • Save oshliaer/c0d1b76b6067f36ac4c849ab3f0a46b3 to your computer and use it in GitHub Desktop.
Save oshliaer/c0d1b76b6067f36ac4c849ab3f0a46b3 to your computer and use it in GitHub Desktop.
Order the table on https://ankiweb.net/shared/addons/ by ratings

Order the table on https://ankiweb.net/shared/addons/ by ratings

{
  const data = [...document.querySelectorAll('tr')].map((row) => [
    row,
    ...[...row.querySelectorAll('td')].map((cell) => cell.innerHTML),
  ]);
  const out = data.filter((item) => item.length === 8);
  out.sort((a, b) => b[5] - a[5]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment