WordPress injection attack, JavaScript code disables site.

The other day I found this piece of code in many of my JavaScript files on a WordPress installation I had running. This code disabled my website, but I was more curious how the code was injected to every JavaScript file that I had running for the various plugins and scripts I made for the website. If anyone has any knowledge about injection attacks and is running some code scanning, be sure to look for parts of this in your files:

Bad JavaScript Code [PDF]