Skip to content

Commit

Permalink
Update Steam_Card_Exchange_Watchlist_Synchronizer.user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurvin authored Dec 30, 2018
1 parent ef5fe7b commit d8b7d36
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Steam_Card_Exchange_Watchlist_Synchronizer.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @namespace Steam Card Exchange Watchlist Synchronizer
// @author Laurvin
// @description Synchs with actual Steam Inventory
// @version 3.0
// @version 3.2
// @icon http://i.imgur.com/XYzKXzK.png
// @downloadURL https://github.com/Laurvin/Steam-Card-Exchange-Watchlist-Synchronizer/raw/master/Steam_Card_Exchange_Watchlist_Synchronizer.user.js
// @include http://www.steamcardexchange.net/index.php?userlist
Expand Down Expand Up @@ -43,7 +43,7 @@ function monkeyRequest(url) {
GM_xmlhttpRequest({
method: 'GET',
url: url,
timeout: 9000,
timeout: 25000,
onload: function(response) {
var InvJSON = JSON.parse(response.responseText);
resolve(InvJSON);
Expand Down Expand Up @@ -79,7 +79,7 @@ function parseInvJSON(InvJSON) {
});

$.each(InvJSON.rgDescriptions, function(index, item) {
if (item.type.includes("Trading Card")) {
if (!item.type.includes("Foil Trading Card") && item.type.includes("Trading Card")) {
if (Steamids.includes(item.market_fee_app)) {
CardAmounts[item.market_fee_app] += InventoryAmounts[item.classid + "_" + item.instanceid];
} else {
Expand All @@ -96,7 +96,14 @@ function parseInvJSON(InvJSON) {
loadInventory('http://steamcommunity.com/my/inventory/json/753/6?start=' + InvJSON.more_start);
} else {
console.log('IncompleteLoad', IncompleteLoad, 'success', InvJSON.success);
if (IncompleteLoad === false && InvJSON.success === true) makeChanges();
if (IncompleteLoad === false && InvJSON.success === true)
{
makeChanges();
}
else
{
$('#SynchDiv').append('<p>FAILURE loading (part of) Steam Inventory! See if this link works: <a href="http://steamcommunity.com/my/inventory/json/753/6">http://steamcommunity.com/my/inventory/json/753/6</a>, if not then Steam is down or things have changed. Reload this page to try again.</p>');
}
}
}

Expand Down

0 comments on commit d8b7d36

Please sign in to comment.