Skip to content

Instantly share code, notes, and snippets.

@dontangg
Last active May 9, 2020 01:26
Show Gist options
  • Save dontangg/4288af4213ea543124dc7f15d7f597cf to your computer and use it in GitHub Desktop.
Save dontangg/4288af4213ea543124dc7f15d7f597cf to your computer and use it in GitHub Desktop.
Make a bookmark with this as the URL. Go to the full gear list for a character on swgoh.gg and click the bookmark. (eg https://swgoh.gg/characters/supreme-leader-kylo-ren/gear-list/)
var csv = $('.media-list li.media').map((i, gearDiv) => {
var gearName = $(gearDiv).find('.media-heading h5').text();
var totalCount = parseInt($(gearDiv).find('.media-heading p').text().substring(1));
return gearName + ',' + totalCount;
}).toArray().join('\n');
csv = "Name,Total\n" + csv;
window.download(csv, "FullGearList.csv", "text/csv");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment