Last active
May 9, 2020 01:26
-
-
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/)
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
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