Created
January 19, 2019 19:02
-
-
Save PabloWestphalen/c5f16b551dc33fa66ca8e0e2f3009e62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
function() { | |
let div = '<div id="progress" style="position: fixed; z-index: 1000; background-color: #424c59; padding: 1em; bottom: 1em; left: 1em; border-radius: 4px; box-shadow: 1px 2px 12px 0 black">Clearing wishlist...</div>'; | |
document.querySelector("body").innerHTML+=div; | |
let progress = document.getElementById("progress"); | |
let promises = [], count = 0; | |
for (let id of g_Wishlist.rgAllApps) { | |
let form = new FormData(); | |
form.append('sessionid', g_sessionID); | |
form.append('appid', id); | |
promises.push(fetch(g_strWishlistBaseURL+'remove', {method: 'POST', body: form}).then(() => { | |
let msg = "removed app "+id+", total removed: "+count; | |
console.log(msg); | |
progress.innerHTML=msg; | |
count++; | |
})); | |
} | |
Promise.all(promises).then(() => { | |
console.log("done removing. refreshing..."); | |
progress.parentNode.removeChild(progress); | |
location.reload(); | |
}); | |
} | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for this. I tried it, and it hit a rate-limit, but it's certainly a useful start.
For anyone else that stumbles upon this, there's a serial version of roughly the same idea at https://www.reddit.com/r/Steam/comments/ah9as8/comment/eecsutc/. It seems to get through about 4 per second right now, so if you can wait, or your wishlist is small, that might be simple-enough.