Since I was tired that my sad pets won't get happy with 1 or 2 rides, I decided to make a script to attack the problem.
This is my first script in JS so please bare with me lol
Anyway, I've already gotten to make it refresh back and forth according to the Start/Stop buttons, at least in Chrome with Tampermonkey (haven't tested on others yet).
Buuut my ultimate goal is to auto stop when pet is finally happy. Here is where I'm stuck now.
Questions:
1. I tried a fetch to get the mood of the chosen pet which on console get it right, but outside of my function I only get undefined (apparently I'm having problems with returning + async + fetch taking time maybe + I'm a noob trying sorry haha). So any hints about how to get my mood variable outside of my function?
2. Since I couldn't use LocalStorage to save the input.Click() because of object type I had to copy paste twice the block for filling the combobox of pet names (block in sendPet function). Any advice on how to improve this? I hated copypasting.
3. After solving point 1 I'll move onto mood evaluation, so that's missing for now.
Error:
Thanks for reading. I'm burn out now but I'll continue tomorrow with whatever you can suggest me