var valid_close = false; function confirm() { if (!valid_close) return "If you didn't try to close the page, please report the framebreaker site by clicking report"; } window.onbeforeunload = (1) ? confirm : null;