I’m proud of myself - I just debugged somebody else’s Javascript code, and I’m not even a programmer. Now it works as intended.