Just a FYI.
It's not correct all the time, sadly.. For example, app/301540 has steam trading cards. Also this app/467000 and there's more like these.
Only way to know I guess would be store page where there's badge progress. (or using something like steamcardexchange.net)
Comment has been collapsed.
You can use either the SteamCardExchange page (ex: https://www.steamcardexchange.net/index.php?gamepage-appid-730) or the Steam badge page (ex: https://steamcommunity.com/id/raggart/gamecards/730) to determine if a game has cards or not. You'll probably still run into a few exceptions, because Steam is full of exceptions.
Comment has been collapsed.
That's your link id/raggart if you don't have the game it redirects to your badges page, i.e. try with 1938010
there's also this page https://steamcommunity.com/stats/610180/achievements but I think it would give same info as the steam api script is using.
Comment has been collapsed.
Since you already made the color picking option, is there any reason not to include the ability to pick color for cards / no cards? Red and green can look pretty similar for some people.
Comment has been collapsed.
I use opera gx, together with ESGST - nothing works for me, there are no icons.
Comment has been collapsed.
Some games for example https://www.steamgifts.com/game/dldgj/moonstone-island say that don't have trading cards.
I changed the detection to use SteamCardExchange and search the tittle of the HTML (the website doesn't have an API)
// Returns: true / false / null (null = unknown/error)
async function fetchHasCards(appid){
return await new Promise(resolve=>{
GM_xmlhttpRequest({
method:'GET',
url:`https://www.steamcardexchange.net/index.php?gamepage-appid-${appid}/`,
timeout:15000,
onload:(res)=>{
try{
resolve(res.responseText.search("<title>Showcase :: Game not found!</title>") == -1 ? true : false);
}catch{ resolve(null); }
},
onerror:()=>resolve(null),
ontimeout:()=>resolve(null),
});
});
}
Also changed this two lines in Cache to use the value from LS.cachePrefix instead of the hard coded 'sgc_app_'
const keyFor = (appid) => LS.cachePrefix + appid;
function clearCache(){ Object.keys(localStorage).forEach(k => { if (k.startsWith(LS.cachePrefix)) localStorage.removeItem(k) }); }
Comment has been collapsed.
56 Comments - Last post 1 hour ago by adam1224
387 Comments - Last post 1 hour ago by Mishasama
49 Comments - Last post 2 hours ago by Jztr
1,322 Comments - Last post 5 hours ago by MeguminShiro
1,661 Comments - Last post 5 hours ago by sensualshakti
2,075 Comments - Last post 7 hours ago by MayushiiChann
579 Comments - Last post 7 hours ago by Andreas89
416 Comments - Last post 3 minutes ago by GameSetGo
123 Comments - Last post 13 minutes ago by Kouseyz
675 Comments - Last post 19 minutes ago by acolis
64 Comments - Last post 36 minutes ago by cassioht
369 Comments - Last post 41 minutes ago by Drae
7,323 Comments - Last post 53 minutes ago by Oppenh4imer
1,062 Comments - Last post 1 hour ago by Fitz10024
Comment has been collapsed.