summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--derelict.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/derelict.js b/derelict.js
index f328db6..4e735ce 100644
--- a/derelict.js
+++ b/derelict.js
@@ -64,9 +64,14 @@ class Wreck {
const team = killmail.team > 1 ? "teamA" : "teamB"
this.domElement.classList.add('wreck', team)
const shipTypeId = this.killmail.victim.ship_type_id
- fetch(`${ESI}/universe/types/${shipTypeId}/?datasource=tranquility`, {cache: "force-cache"})
+ fetch(`${ESI}/universe/types/${shipTypeId}/`, {cache: "force-cache"})
.then(response => response.json())
- .then(typeId => this.domElement.dataset.label = typeId.name)
+ .then(typeId => {
+ this.domElement.dataset.label = typeId.name
+ return fetch(`${ESI}/universe/groups/${typeId.group_id}/`, {cache: "force-cache"})
+ })
+ .then(response => response.json())
+ .then(group => this.domElement.dataset.group = group.name)
this.domElement.appendChild(iconElement)
this.point.position.copy(killmail.victim.position)
this.point.add(object2d)