nit: please break the line after equal to make it more readable something like 
$('crop-header').textContent = 
      filename.substr(0, filename.lastIndexOf('.')) || filename;