In the Firefox web browser, if you accidentally close a tab, then you can quickly reopen it using the Ctrl+Shift+T hotkey. Using this hotkey, you can open only the recently closed tabs. If you keep using this hotkey, it will keep opening the previously closed tabs in the same order they were closed.
If you want to select which of the closed tabs you want to restore, then you have to use the menubar options given under the History menu. But if you want an easier way to re-open the previously closed tabs then you can use the Firefox extension “Restore Closed Tabs Button”.
This Firefox extension adds a button in the browser toolbar. When you click on this button, it displays a list of the previously closed tabs. You can pick any of these from the list to reopen them. You can choose to open all of these tabs at once by selecting Open All in Tabs from the menu that appears when you click on the toolbar icon. If you want it to forget about all the closed tabs then you can select Forget Closed Tabs. There is also an option to clear the history in Firefox.
In the settings for the extension, you can increase the number of closed tabs can be re-opened. By default, it shows only seven closed tabs, but you can increase it to anything between 2 and 25 if you want. This limit of number of tabs exists because Firefox does not allow you to store the history of more than 25 closed tabs. Among other things, you can choose to fetch the favicons for the websites and display the favicons in the list.
Even though the feature already exists in Firefox, the “Restore Closed Tabs Button” extension makes everything easier and allows you to re-open any of the selected closed tabs easily.
You can get the “Restore Closed Tabs Button” extension for Firefox from https://addons.mozilla.org/en-US/firefox/addon/undo-closed-tabs-revived/