Fix javascript being displayed in the "Events" tab

Javascript was just being displayed when clicking on a changed file in the
"Events" tab.