Be careful with old versions!
These versions are displayed for reference and testing purposes. You should always use the latest version of an add-on.
. Configurable Action for Window Close Button / ALT+F4 , including recommended setting "Close Current Tab"! (like Hide C. T. Plus for Firefox)
. Sub-option for "'Close Current Tab': Close Window if only one Tab remains."