Hide or toggle nav bar in Firefox 29 with Vimperator

RSS  •  Permalink  •  Created 26 Jun 2014  •  Written by Alberto Pettarin

Annoyed by the fact that Firefox (Iceweasel) 29 no longer lets you hide the nav bar?

To hide the nav bar, just add this line to your userChrome.css:

#fullscr-toggler { display:none!important; }

Then, if you want to show the nav bar, you can issue:

:set gui=navigation

and to hide it again:

:set gui=nonavigation

If you use the great Vimperator (and you should), it is more convenient mapping the toggle command to a keystroke, e.g. F2. Just add these lines (found on SuperUser) to your .vimperatorrc:

map <silent> <F2> :js toggle_navbar()<CR>
:js << EOF
function toggle_navbar() {
    var nb = document.getElementById('nav-bar');
    if (!nb)
        return;
    nb.style.visibility = (nb.style.visibility == '') ? 'collapse' : '';
    nb.style.overflow = (nb.style.height == '') ? '' : 'hidden';
    }
toggle_navbar();
EOF