The first commit handles issues where there are multiple tokens on initially loading a scene. The console log was reporting an error stating that img is not defined for each token (createToken is called on initial startup). This seemed to only occur with a lot of tokens.
The second commit makes it so that holding down 'v' (or whatever keybind) will only trigger the keydown event once, instead of over and over again while you hold the key down. This makes it so you have to hover over the token first before pressing v before image hover triggers, so let me know if you'd prefer not to use this commit and I can remove it.
The first commit handles issues where there are multiple tokens on initially loading a scene. The console log was reporting an error stating that img is not defined for each token (createToken is called on initial startup). This seemed to only occur with a lot of tokens.
The second commit makes it so that holding down 'v' (or whatever keybind) will only trigger the keydown event once, instead of over and over again while you hold the key down. This makes it so you have to hover over the token first before pressing v before image hover triggers, so let me know if you'd prefer not to use this commit and I can remove it.