Last active
December 21, 2018 15:43
-
-
Save ulisseslima/7777a97c73fddc3e265bfc3c894aae88 to your computer and use it in GitHub Desktop.
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
// paste this snippet on to a javascript console with the steam wishlist page open to dump all app ids | |
let app_set = new Set(); | |
function getAppId(mutationList, observer) { | |
mutationList.forEach((mutation) => { | |
if (mutation.addedNodes && mutation.addedNodes[0]) app_set.add(mutation.addedNodes[0].dataset.appId); | |
if (mutation.removedNodes && mutation.removedNodes[0]) app_set.add(mutation.removedNodes[0].dataset.appId); | |
}); | |
} | |
let m = new MutationObserver(getAppId); | |
m.observe(document.getElementById('wishlist_ctn'), { childList: true }); | |
let last = -1; | |
function autoscroll(element, goal) { | |
let max = goal || element.offsetHeight; | |
if (element.scrollTop >= max || element.scrollTop == last) return; | |
last = element.scrollTop; | |
element.scrollTop += 100; | |
timeout = setTimeout(() => { | |
autoscroll(element, goal); | |
}, 10); | |
} | |
let max = parseInt(document.querySelector('#wishlist_ctn').style.height); | |
autoscroll(document.documentElement, max); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment