Skip to content

Commit

Permalink
change logDOM string
Browse files Browse the repository at this point in the history
  • Loading branch information
SeRi0uS007 committed Dec 19, 2024
1 parent 805469b commit 494a094
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions code.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -1294,14 +1294,6 @@
}
}

function getAmountString(amount) {
if (amount == 1) {
return '';
}

return ` [x${amount}]`;
}

const sellQueue = async.queue(
(task, next) => {
market.sellItem(
Expand All @@ -1321,7 +1313,8 @@
const callback = () => setTimeout(() => next(), getRandomInt(1000, 1500));

if (success) {
logDOM(`${padLeft} - ${itemName}${getAmountString(task.item.amount)} listed for ${formatPrice(market.getPriceIncludingFees(task.sellPrice) * task.item.amount)}, you will receive ${formatPrice(task.sellPrice * task.item.amount)}.`);
const amount = task.item.amount == 1 ? '' : `${task.item.amount}x `;
logDOM(`${padLeft} - ${amount}${itemName} listed for ${formatPrice(market.getPriceIncludingFees(task.sellPrice) * task.item.amount)}, you will receive ${formatPrice(task.sellPrice * task.item.amount)}.`);
$(`#${task.item.appid}_${task.item.contextid}_${itemId}`).css('background', COLOR_SUCCESS);

totalPriceWithoutFeesOnMarket += task.sellPrice * task.item.amount;
Expand Down

0 comments on commit 494a094

Please sign in to comment.