window.onbeforeunload = function() { return "Dude, are you sure you want to refresh? Think of the kittens!"; }