glio.js is a javascript library that detects if the mouse of a user leaves the viewport/document borders of your website and when this happens, trigger your callback.
Reasons for use glio.js:
Website Demo