Skip to content

Instantly share code, notes, and snippets.

@wanderer06
Last active February 9, 2021 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wanderer06/fe73241297c6879e5ab9f53a20b0b451 to your computer and use it in GitHub Desktop.
Save wanderer06/fe73241297c6879e5ab9f53a20b0b451 to your computer and use it in GitHub Desktop.
Lowest champ mastery needed
$$('#container tbody tr').map(el => [el.querySelector('td:first-child').innerText, parseInt(el.querySelector('td:last-child').innerText.replace(',', '')), parseInt(el.querySelector('td:nth-child(2)').innerText)]).reduce((accum, item) => item[1] < accum[1] ? item : accum, ['Unknown', Number.MAX_SAFE_INTEGER, '']).map((item, index) => index === 2 ? `${item} -> ${item + 1}` : item)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment