There is detection code for checking if processing a queue will yield trading cards:
|
if (HELPERS.isLoggedIn() && (Date.now() - (localStorage.SteamDiscoveryQueueAutoSkipper_lastchecked || 0) > CONSTANTS.HOUR)) { |
|
fetch('https://store.steampowered.com/explore/', {credentials: 'include'}).then(r =>r.text().then(body => { |
|
const doc = new DOMParser().parseFromString(body, 'text/html'); |
|
if (HELPERS.getQueueCount(doc) > 0) |
|
ShowConfirmDialog('SteamDiscoveryQueueAutoSkipper', |
|
'You seem to have remaining unlockable trading cards in your discovery queue!\n' |
|
+ 'Do you want to start auto-exploring the queue now?', |
|
'Yes!', 'No, remind me later.').done(function () { |
|
location.href = 'https://store.steampowered.com/explore/startnew'; |
|
}); |
|
else |
|
console.log('Queue count is 0'); |
|
|
|
localStorage.SteamDiscoveryQueueAutoSkipper_lastchecked = Date.now(); |
|
})); |
|
return HandlerResult.abort; |
|
} |
It checks if getQueueCount returns > 0. getQueueCount tries to find a subtext class tag, which doesn't exist anymore:
|
getQueueCount: (doc) => { |
|
const _subtext = doc.getElementsByClassName('subtext')[0]; |
|
if (_subtext) { |
|
const queue_count_subtext = _subtext.innerHTML; |
|
let queue_count = parseInt(queue_count_subtext.replace(/[^0-9.]/g, ''), 10); |
|
if (isNaN(queue_count)) |
|
{ |
|
const language = doc.documentElement.getAttribute('lang'); |
|
switch(language) |
|
{ |
|
case 'de': |
|
queue_count = queue_count_subtext.includes(' eine ') ? 1 : 0; |
|
break; |
|
case 'fr': |
|
queue_count = queue_count_subtext.includes(' une ') ? 1 : 0; |
|
break; |
|
case 'it': |
|
queue_count = queue_count_subtext.includes(" un'altra ") ? 1 : 0; |
|
break; |
|
case 'pl': |
|
queue_count = queue_count_subtext.includes(' jedną ') ? 1 : 0; |
|
break; |
|
case 'ru': |
|
case 'uk': |
|
queue_count = queue_count_subtext.includes(' одну ') ? 1 : 0; |
|
break; |
|
default: |
|
queue_count = 0; |
|
} |
|
} |
|
return queue_count; |
|
} |
|
}, |
This seems to be broken as Valve changed the website probably some time throughout this year.
There is detection code for checking if processing a queue will yield trading cards:
SteamDiscoveryQueueAutoSkipper/SteamDiscoveryQueueAutoSkipper.user.js
Lines 320 to 336 in 2763beb
It checks if getQueueCount returns > 0. getQueueCount tries to find a
subtextclass tag, which doesn't exist anymore:SteamDiscoveryQueueAutoSkipper/SteamDiscoveryQueueAutoSkipper.user.js
Lines 111 to 143 in 2763beb
This seems to be broken as Valve changed the website probably some time throughout this year.