The easiest way is to install relevant add-ons in Firefox.
For any of the following setup, install the respective add-ons. Firefox may need to restart, but often unnecessary for Firefox Quantum. The shortcut key, if available, can be changed from Add-ons Manager > Extensions, in Preferences for respective add-on.
For Firefox Legacy
Setup A uses the following add-ons:
- Hide Navigation Bar, tested with 1.41.1-signed
- Hide Tabbar, tested with 22.214.171.124-signed
- HideScrollbars, tested with 0.2.1-signed
Usage: For example, I have used separate keys F3 and F4 to toggle the navigation menu and tab bar (via Hide Navigation Bar and Hide Tabbar) respectively. To hide the bars, press the assigned keys in turn i.e. press F3 then F4. This will give Firefox with visible title bar (window decoration) only.
Limitation: Assigning the same key does not work well, likely because of some delay exists to hide either bar. The result is similar if the separate keys were pressed at the same time. Either way, one of the bars will not hide and play hide-and-seek with the user.
Available for Firefox 56 and older (Deprecated, no longer available from Firefox Add-ons). Tested using Firefox 41.0 on Linux. No screenshot.
For Firefox Quantum
Setup B uses the following add-ons:
Usage: Go to a web page on HTTP, HTTPS, or localhost, then click "New window without toolbar" on the toolbar or context menu. The web page will additionally open in a new window with visible title bar and vertical scroll bar only.
Limitation: No keyboard shortcut. No configuration at all. This add-on does not open any page on local filesystem (file:///) and built-in pages (about:*) at all.
Available for Firefox 42 and newer. Tested using Firefox 50.0 and 63.0 on Linux.
Setup C uses the following add-ons:
Usage: Go to a web page, then click "Move current tab to pop-up window" on the toolbar or "popup/merge current page" in the context menu. The web page will move to a new window with visible title bar and vertical scroll bar only. To revert the new window to normal tab, click again on "popup/merge current page" in the context menu.
Limitation: No keyboard shortcut. Some configuration is possible. The pop-up window will always stay on top of original window of Firefox, which can not be changed.
Available for Firefox 53 and newer. Tested using Firefox 63.0 on Linux.
For Firefox without add-on
I have posted a separate answer at below (click or scroll down) that works for any release of Firefox, but not the easiest way and has no keyboard shortcuts.