Skip to content

A JavaScript Library to send alerts when user tries to leave.

Notifications You must be signed in to change notification settings

ilovecode1/dontquit.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

#Version Info

##1.0.1

Fixed Typo

##1.0.0

Release

#Tested Browsers

##Works Great

IE (Edge), Chrome

#Meh

Safari

##No Custom Text

Firefox

Simple Usage

window.onbeforeunload=dontquit.do;

#More Custom Usage

dontquit.defaultText = "Custom Text";
window.onbeforeunload=dontquit.do;

#Do More

var notsaved = true;
if (notsaved){
  dontquit.defaultText = "Hey your not saved yet!";
  window.onbeforeunload=dontquit.do;
}
else {
  
  dontquit.defaultText = "Double Check";
  window.onbeforeunload=dontquit.do;

}

#More

dontquit.Version
dontquit.Author

About

A JavaScript Library to send alerts when user tries to leave.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published