Fix missing delete button when comments are not supported

Theoretical case.
Fix various jslint warnings