Created
November 17, 2022 18:06
-
-
Save VlatkoStojkoski/1e2c89397b6178af7b08b5d21cea1e33 to your computer and use it in GitHub Desktop.
Sort mendo.mk tasks from easiest to hardest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelector('body > div.page-container > div.main > div.main-content > div:nth-child(3) > div > table > tbody').innerHTML = [...document.querySelectorAll('body > div.page-container > div.main > div.main-content > div:nth-child(3) > div > table > tbody > tr > td:nth-child(5) > a')].sort((a, b) => +a.innerText.match(/(?<= \()\d+/)[0] > +b.innerText.match(/(?<= \()\d+/)[0] ? -1 : +a.innerText.match(/(?<= \()\d+/)[0] < +b.innerText.match(/(?<= \()\d+/)[0] ? 1 : 0 ).map((a) => a.parentElement.parentElement.outerHTML).join(''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment