Last active
August 7, 2021 00:22
-
-
Save b1oki/e8903e4644e68c1d2b4e8943fe4645ee to your computer and use it in GitHub Desktop.
Steam. Clear ignored games list on https://store.steampowered.com/account/notinterested/
This file contains 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
resetQueue(); | |
var PAUSE_INTERVAL = 500; //Wait for this many milliseconds between each request | |
function resetQueue() { | |
//Perform initial request | |
jQuery.get("https://store.steampowered.com/dynamicstore/userdata/", {t: new Date().getTime()}, function(data) { | |
// @xorbis: The data.rgIgnoredApps is now an object, should use Object.keys(data.rgIgnoredApps) instead. | |
var totalItems = data.rgIgnoredApps.length; | |
if (totalItems == 0) { | |
alert("There are no items in your Not Interested list."); | |
return; | |
} else { | |
var approval = confirm("About to remove " + totalItems + " games from your Not Interested list, proceed?"); | |
} | |
if (!approval) { | |
return; | |
} | |
removeItem(0, data.rgIgnoredApps); | |
}, "json").fail(function() { | |
console.error("There was an error retrieving your Discovery Queue"); | |
}); | |
} | |
function removeItem(i, applist) { | |
if (i >= applist.length) { | |
alert("All items cleared from Not Interested list."); | |
return; | |
} | |
jQuery.ajax({ | |
url: "https://store.steampowered.com/recommended/ignorerecommendation/", | |
type: "POST", | |
data: {sessionid: g_sessionID, appid: applist[i], remove: 1, snr: "1_account_notinterested_"}, | |
success: function() { | |
console.log((i + 1) + "/" + applist.length + " items removed"); | |
setTimeout(function() { | |
removeItem(i + 1, applist); | |
}, PAUSE_INTERVAL); | |
}, | |
error: function() { | |
console.error("Request failed, your Steam session id is probably incorrect/invalid, reload the page and try again"); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's a fixed version that works with TamperMonkey