You've probably encountered sites that open up new windows without menu bars or toolbars and so on. With this little Mozilla trick, you can press Control+F5 to get your chrome back. Or, press Shift+Control+F5 to get back the chrome in all browser windows, which is useful if someone has disabled the keyboard in a window. First, add the following to userChrome.css in your profile's chrome directory:
tabbrowser {
-moz-binding: url('file:///stuff/rechrome.xml#tabbrowser');
}
You may use a different path if you wish. Here, /stuff/rechrome.xml is used. Then
add the following to that file:
<?xml version="1.0"?>
<bindings id="rechromeBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="tabbrowser" extends="chrome://global/content/bindings/tabbrowser.xml#tabbrowser">
<handlers>
<handler event="keypress" keycode="VK_F5" modifiers="control">
window.top.document.documentElement.setAttribute("chromehidden","");
</handler>
<handler event="keypress" keycode="VK_F5" modifiers="shift,control">
var wm=Components.classes["@mozilla.org/appshell/window-mediator;1"].getService();
wm=wm.QueryInterface(Components.interfaces.nsIWindowMediator);
var wlist=wm.getEnumerator(null);
while (wlist.hasMoreElements("navigator:browser")){
var docelem=wlist.getNext().document.documentElement;
if (docelem.hasAttribute("chromehidden"))
docelem.removeAttribute("chromehidden");
}
</handler>
</handlers>
</binding>
</bindings>
Feel free to change the keys to something else. Not that this trick may require a fairly new version of Mozilla. Slight changes may be needed for older versions or for Phoenix.