Always show the Legend button.

Also clean up some jshint warnings.