There seems to be no "post comment" button if window.wgDisableAnonymousEditing is true, so this line should be part of the "else" as well IMO.