Created
February 13, 2022 00:42
-
-
Save Enapiuz/35d48934a3edebf6a25a6cb9c970e55c to your computer and use it in GitHub Desktop.
Planet finder
This file contains hidden or 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
/** | |
To find proper planets for PI easier. | |
Works for pages like https://evemaps.dotlan.net/region/Heimatar/planets | |
Just change needed planets in neededPlanets array. | |
*/ | |
$.find("table tr").forEach((elem) => { | |
// Temperate - 3 | |
// Ice - 4 | |
// Gas - 5 | |
// Oceanic - 6 | |
// Lava - 7 | |
// Barren - 8 | |
// Storm - 9 | |
// Plasma - 10 | |
const neededPlanets = [5, 8, 9]; | |
for (let num of neededPlanets) { | |
const pl = $(elem).find(`td:nth-child(${num})`) | |
if (parseInt(pl.text()) > 0) { | |
pl.css("background-color", "green") | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment