Skip to content

Commit

Permalink
Merge pull request #226 from xPaw/fix-spinner
Browse files Browse the repository at this point in the history
Fix sell progress breaking button style
  • Loading branch information
Nuklon authored Sep 13, 2024
2 parents 765f9be + 6bdc144 commit 644bc1c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions code.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
requestStorageHash = `${requestStorageHash}:steamcommunity.com/market`;
delayBetweenRequests = 1000;
}

const lastRequest = JSON.parse(getLocalStorageItem(requestStorageHash) || JSON.stringify({ time: new Date(0), limited: false }));
const timeSinceLastRequest = Date.now() - new Date(lastRequest.time).getTime();

Expand Down Expand Up @@ -150,7 +150,7 @@
callback(error, data);
} else {
callback(null, data)
}
}
},
error: (xhr) => {
if (xhr.status === 429) {
Expand Down Expand Up @@ -500,7 +500,7 @@
// Price is before fees.
SteamMarket.prototype.sellItem = function(item, price, callback /*err, data*/) {
const url = `${window.location.origin}/market/sellitem/`;

const options = {
method: 'POST',
data: {
Expand All @@ -520,15 +520,15 @@
// Removes an item.
// Item is the unique item id.
SteamMarket.prototype.removeListing = function(item, isBuyOrder, callback /*err, data*/) {
const url = isBuyOrder
? `${window.location.origin}/market/cancelbuyorder/`
const url = isBuyOrder
? `${window.location.origin}/market/cancelbuyorder/`
: `${window.location.origin}/market/removelisting/${item}`;

const options = {
method: 'POST',
data: {
sessionid: readCookie('sessionid'),
...(isBuyOrder ? { buy_orderid: item } : {})
data: {
sessionid: readCookie('sessionid'),
...(isBuyOrder ? { buy_orderid: item } : {})
},
responseType: 'json'
};
Expand Down Expand Up @@ -735,7 +735,7 @@
};

request(
url,
url,
options,
(error, data) => {
if (error) {
Expand Down Expand Up @@ -800,7 +800,7 @@
const options = { method: 'GET' };

request(
url,
url,
options,
(error, data) => {
if (error) {
Expand Down Expand Up @@ -1333,7 +1333,7 @@

logDOM(`${padLeft} - ${itemName} not added to market${message ? ` because: ${message.charAt(0).toLowerCase()}${message.slice(1)}` : '.'}`);
$(`#${task.item.appid}_${task.item.contextid}_${itemId}`).css('background', COLOR_ERROR);

callback();
}
);
Expand Down Expand Up @@ -2883,7 +2883,7 @@
increaseMarketProgress();
next();
};

if (success) {
setTimeout(callback, getRandomInt(50, 100));
} else {
Expand Down Expand Up @@ -3903,8 +3903,8 @@
.price_option_price { width: 100px }
.inventory_item_price { top: 0px;position: absolute;right: 0;background: #3571a5;padding: 2px;color: white; font-size:11px; border: 1px solid #666666;}
.see_inventory_buttons {display:flex;flex-wrap:wrap;gap:10px;}
.see_inventory_buttons > .see_inventory_buttons {flex-basis: 100%;}
.see_inventory_buttons {display:flex;flex-wrap:wrap;gap:10px;align-items:start;}
.see_inventory_buttons > .see_inventory_buttons, .see_inventory_buttons > #inventory_items_spinner {flex-basis: 100%;}
#see_market_progress { display: block; width: 50%; height: 20px; }
#see_market_progress[hidden] { visibility: hidden; }
Expand Down

0 comments on commit 644bc1c

Please sign in to comment.