Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to disable onbeforeunload in Firefox browser. Don't tell me to disable JavaScript. I just want to disable this dialog box from appearing.

share|improve this question

migrated from stackoverflow.com Jul 10 '11 at 3:41

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote -1 down vote accepted

one thing i do when some annoying website run some stuff like that is overriding the functions. let me give you an example.

in most cases if onbeforeunload has been defined using this method:

window.onbeforeunload = function() {
   ....
}

You can override it using firebug console the same way

window.onbeforeunload = function() {} // blank function

Note: I have encountered some script that use self.close with a timer that is also very annoying for a slow reader like me. here is my solution

window.close = function() {} // blank function

simply override closing the window.

I hope this answers your question

share|improve this answer
    
I want this feature to be disabled every page i visit –  MonsterMMORPG Jul 10 '11 at 16:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.