50e6108012
* Add confirmation for closing window * Make function an event listener for consistency * Change let to const * Refactor for compatability