Fork me on GitHub
Home
Simple
Unregister
Multiple
Custom

Custom messages in conditions, beforeunload example.

To see it in action, refresh the page. You will be prompted for confirmation no matter what. If no conditions is checked, you will see the default message. If one or more of the below conditions are checked, you will be shown the first of the checked custom messages.

Condition 1

Condition 2