on-leave-intent

A script to detect if the user is leaving the page and calls a function.