Do things before the user leaves your web page.
# Using npmnpm install --save before-leaving-me# Using yarnyarn add before-leaving-me
❓ Get Help
There are few ways to get help:
- Please post questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.
- For bug reports and feature requests, open issues. 🐛
- For direct and quick help, you can use Codementor. 🚀
Do something before leaving me.
input: A string representing the message to show before the window is closed or a function returning that value.
- Object The
prepare(func, speed, delay, handlers)
...or before preparing to leave me. Catch the moment when the user moves the mouse in the top side of the page (and most probably wants to close the window).
func: A function to be called when the user moves the mouse to the top of the page.
speed: The minimum mouse vertical speed (default:
delay: The number of miliseconds between two moments when we're trying to catch the mouse leave.
handlers: An array of booleans in this order:
[ignoreLeave, ignoreMove, ignoreBlur](e.g.
[true, true, false],
[1, 1, 0]).
- Object The
😋 How to contribute
Have an idea? Found a bug? See how to contribute.
💖 Support my projects
I open-source almost everything I can, and I try to reply to everyone needing help using these projects. Obviously, this takes time. You can integrate and use these projects in your applications for free! You can even change the source code and redistribute (even resell it).
However, if you get some profit from this or just want to encourage me to continue creating stuff, there are few ways you can do it:
Starring and sharing the projects you like 🚀
Bitcoin—You can send me bitcoins at this address (or scanning the code below):