Home » Questions » Computers [ Ask a new question ]

Firefox: Is it possible to disable exit alerts?

Firefox: Is it possible to disable exit alerts?

Sometimes the website will show an alert box akin to "Are you sure you want to leave?" when you try to leave the site.

Asked by: Guest | Views: 73
Total answers/comments: 1
Guest [Entry]

"This answer is really late, but this question showed up in Google for me when I was looking for a solution to this problem today. The solution I eventually found is here: http://userscriptsdotorg/scripts/show/23865

// ==UserScript==
// @name BlockUnloadEvents
// @namespace http://theaceoffire.8k.com/STOPTHEMADDNESS
// @description This stops ANY AND ALL javascript that stops you from leaving a page. Inspired by this greasemonky script: http://userscriptsdotorg/scripts/show/20781
// @include *
// ==/UserScript==
(function() {
unsafeWindow.onbeforeunload = null;

unsafeWindow.onunload = null;

//unsafeWindow.alert = null;

//unsafeWindow.confirm = null;

//unsafeWindow.prompt = null;

//unsafeWindow.open = null;
})();"