I have a window.unbeforeunload
event and I don't want to fire it if user clicks on logout.
Is there a way to get a request URL in JS before doing its action? My idea is to check if, for example, url is https://www.example.com/logout
then don't show alert box in window.unbeforeunload
event.