Skip to content

Instantly share code, notes, and snippets.

@Enapiuz
Created February 13, 2022 00:42
Show Gist options
  • Save Enapiuz/35d48934a3edebf6a25a6cb9c970e55c to your computer and use it in GitHub Desktop.
Save Enapiuz/35d48934a3edebf6a25a6cb9c970e55c to your computer and use it in GitHub Desktop.
Planet finder
/**
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