twitch-points-autoclicker
twitch-points-autoclicker copied to clipboard
Collected points counter Rework
Its randomly increased from 2 to 52
Can confirm that I am having issues with the collected points counter as well. Checked the console logs and the autoclicker functionality is indeed still collecting points so it is just an issue with the counter updating somewhere in that pipeline. My counter has been stuck on 63890 points for the past couple weeks. Running on Chrome 85.0.4183.102 (Official Build). Happy to provide more information if it helps!
Yup, twitch made some changes to how points are displayed, so I'm gonna have to rework that. Thanks for your reports!
For sure! Happy to help, thanks for the great extension :+1:
Woulda of been nice if they didn't hide it behind a react modal :)
Alrighty, I've made an executive decision to just change the amount of points collected to amount of times said points are collected. Should be live in 1.6 update that is currently being pushed to supported webstores.
Was this decision done because you couldn't find a solution to reading how many points were collected per grab? If that's the case, I know a solution to finding out how many points were grabbed when a chest is clicked.
Yeah, it was either trying to go through the react element or wait for the hint to pop up. The hint timing would depend on how fast the browser can render said pop-up and thus is a pain to grab as well
Can use mutations observer to permanently look for hint/small popup after clicking points, thus eliminating any performance issues, timing issues, etc. https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
Would look something like:
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
var observer = new MutationObserver(function(mutations, observer) {
mutations.forEach(function(mutation) {
if (mutation.type == "attributes") {
if (mutation.attributeName == "id") {
if ((mutation.target.innerHTML).includes("100")) {
// You have found the +100 point hint/popup. Now add to your point pool and
update chrome.storage.sync
// Do this for every point variant. e.g 70,60,50 points.
})
}
}
}
});
});
observer.observe(document, {
subtree: true,
attributes: true
//...
});
This code snippet is from my point clicker. The mutation is looking for the "100" within all elements that are created on the page. Of course it could be refactored to be more precise or even structured to find that specific element... just was too lazy to do so.
Here's the element you're looking for in the mutations:
ooh, interesting. I Will look into this, thank you!