LPS-49385 - Portlet menu cog now toggles menu visibility
LPS-49385 - Source formatting; we generally don't allow early returns in the JS, but I can't think of any way to remove it without making things more convoluted