Skip to content

Instantly share code, notes, and snippets.

@Dennis14e
Created November 27, 2020 17:27
Show Gist options
  • Select an option

  • Save Dennis14e/781fdc7b94177ae097aaa4287d1cf7c1 to your computer and use it in GitHub Desktop.

Select an option

Save Dennis14e/781fdc7b94177ae097aaa4287d1cf7c1 to your computer and use it in GitHub Desktop.
turnip.exchange sorting script (save as browser bookmark and open on turnip.exchange)
javascript:var parent=document.querySelector("[data-turnip-code]").parentElement;function g_price(e){m=e.textContent.match(/([0-9]+) Bells/);return m!==null?Number(m[1]):0}[].slice.call(parent.children).sort(function(e,t){return g_price(t)-g_price(e)}).forEach(function(e){parent.appendChild(e)})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment