Skip to content

Instantly share code, notes, and snippets.

@sklivvz
Created March 31, 2018 09:57
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 sklivvz/c66ee4f93230bb2a4acecaac198f8ac1 to your computer and use it in GitHub Desktop.
Save sklivvz/c66ee4f93230bb2a4acecaac198f8ac1 to your computer and use it in GitHub Desktop.
// use in console on https://worldofwarcraft.com/en-gb/game/talent-calculator
Array.from(document.querySelectorAll('[data-group="TalentCalculator-class"]')).map((cls)=>{
return { class: cls.getAttribute("name"), specs: Array.from(cls.querySelectorAll('[data-group="TalentCalculator-specs"]')).map((spc)=>{
return { spec: spc.getAttribute("name").split("/")[1], talents: Array.from(spc.getElementsByClassName("Talent")).map((t)=>{
return { name: t.getElementsByClassName("Talent-name")[0].childNodes[0].nodeValue, description: t.getElementsByClassName("Talent-desc")[0].innerText };
})};
})};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment