Permalink
Browse files

fix economy blank

  • Loading branch information...
Manuel-777 committed Jan 18, 2019
1 parent da33380 commit 517e39e497005911222669ae4cf205b070c3236e
Showing with 25 additions and 24 deletions.
  1. +25 −24 window_main/economy.js
@@ -481,30 +481,31 @@ function open_economy_tab(loadMore) {
change.aetherizedCards.forEach(function(obj) {
var grpId = obj.grpId;
var card = cardsDb.get(grpId);

var d = document.createElement("div");
d.classList.add("inventory_card");
d.style.width = "39px";

var img = document.createElement("img");
img.classList.add("inventory_card_img");
img.classList.add("inventory_card_aetherized");
img.style.width = "39px";
img.src = "https://img.scryfall.com/cards"+card.images[cardQuality];

d.appendChild(img);
flr.appendChild(d);

var imgDom = $(img);
addCardHover(imgDom, card);

imgDom.on('click', function() {
if (cardsDb.get(grpId).dfc == 'SplitHalf') {
card = cardsDb.get(card.dfcId);
}
//let newname = card.name.split(' ').join('-');
shell.openExternal('https://scryfall.com/card/'+get_set_scryfall(card.set)+'/'+card.cid+'/'+card.name);
});
if (card && (obj.goldAwarded > 0 || obj.gemsAwarded > 0)) {
var d = document.createElement("div");
d.classList.add("inventory_card");
d.style.width = "39px";

var img = document.createElement("img");
img.classList.add("inventory_card_img");
img.classList.add("inventory_card_aetherized");
img.style.width = "39px";
img.src = "https://img.scryfall.com/cards"+card.images[cardQuality];

d.appendChild(img);
flr.appendChild(d);

var imgDom = $(img);
addCardHover(imgDom, card);

imgDom.on('click', function() {
if (cardsDb.get(grpId).dfc == 'SplitHalf') {
card = cardsDb.get(card.dfcId);
}
//let newname = card.name.split(' ').join('-');
shell.openExternal('https://scryfall.com/card/'+get_set_scryfall(card.set)+'/'+card.cid+'/'+card.name);
});
}
});
}

0 comments on commit 517e39e

Please sign in to comment.