Now that I am fixing the issues spotted by Javascript linter(s) on the code that is running on my website, I keep on wondering how the whole thing was even working in the first place. When I fix a linter error or warning, the functionality gets broken. Yes, that is unfortunate, but apparently the original implementation worked by pure magic in the first place. This means that I need to rethink the approach a bit, which will make it work The Right Way™ .