Removing extra buttons from "Login required" screen

Adding this to the admin/customize/head section will hide the header login and dropdown menu buttons on the login page. There might be a better way to do this.

This kind of thing would be easier if Discourse added some more descriptive css classes to the body,

<script>
    Discourse.ApplicationController.reopen({
        // Gets the current pathname
        currentPathDidChange: function() {
            Discourse.currentPath = window.location.pathname;
        }.observes('currentPath')
    });
    
    Discourse.ApplicationView.reopen({
        didInsertElement: function() {
            this._super();
            if (Discourse.currentPath === '/login') {
                $('.d-header .panel').css('display', 'none');
            }
        }
    });
</script>

4개의 좋아요