Aristophanes wrote:
Thanks I'm sure many of our users will appreciate it. On a side note, and for your own personal growth as a JS programmer going forward I offer you this one critique: get used to using const (for variables that won't be reassigned) and let for those that will, as opposed to using var, which can overwrite global variables. Obviously the statement is in an IIFE so it doesn't matter, it's just a good habit to get used to with modern JS.
The code was a direct copy and paste from the malware.
The global nature of the variable wasn't going to cause any problems
within this simple script.
Nonetheless your advice is all good.