Skip to content

Instantly share code, notes, and snippets.

@BirkhoffLee
Created April 29, 2017 08:47
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 BirkhoffLee/39b6ae5d9d97331a7b88105f5c2ee347 to your computer and use it in GitHub Desktop.
Save BirkhoffLee/39b6ae5d9d97331a7b88105f5c2ee347 to your computer and use it in GitHub Desktop.
Dump all data of minecraft-ids.grahamedgecombe.com as JSON
items={}
$("table.items tr").each((i, tr) => {
item = {}
item.id = $("td.id", tr).html()
item.name = $("span.text-id", tr).html().slice(11).slice(0, -1).toUpperCase()
item.data = (item.id.indexOf(":") != null) ? item.id.split(":")[1] : "";
item.displayname = $("td.row-desc > span", tr).html()
items[item.id]=item
})
console.log(JSON.stringify(items))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment