Whipped this up for one of my projects, pretty basic stuff. Works in all browsers.
Fuck paying $67..
Hope this help save a bro some skirlla.
Fuck paying $67..
Code:
<script>
var exitmsg = ' ***************************************\n\n W A I T B E F O R E Y O U G O !\n\n CLICK THE *Stay on Page* or *Cancel* BUTTON RIGHT\n NOW\n\nYour message can go here and on the other lines\n Your message can go here or one the other lines\n\nYour message can go here or on the other lines\n\n ***************************************';
var exiturl = 'http://www.wickedfire.com';
var unloading = false;
var stoppopup = false;
window.onbeforeunload = function(e) {
/* Kill recurring popup if the user stayed */
if(stoppopup) {
return;
}
e = e || window.event;
/* Popup action for IE and FireFox < v4 */
if(e) {
unloading = true;
e.returnValue = exitmsg;
}
/* Popup action for Chrome and Safari */
unloading = true;
return exitmsg;
}
/* Popup evaluation */
setInterval(function() {
if(unloading) {
unloading = false;
stoppopup = true;
window.location = exiturl;
}
}, 100);
</script>
Hope this help save a bro some skirlla.