warning before closing multiple tabs

Is there a way to turn on a pop up warning before closing multiple tabs? I am always using the X to close a window, often forgetting that I have other tabs open. Dragon just closes all tabs before I realize what I did. Firefox has this warning by default. Thanks for any help.

Hi Kdechman. As far as I know, the only way is through an extension like this one
I haven’t tried it myself, other than that when you open the browser again if you open a new tab it will display recently closed pages in the lower section which might help recover any that wasn’t bookmarked. Failing that check history. Kind regards.