How do I block the pop-ups that show up that says "are you sure you want to exit this page?"
Usually it show up in advertisement pages, expecially "your computer may be in danger" one... so I really want to completely block it
Thanks!
Block "Are you sure you want to exit this page" pop-up
-
- Posts: 8779
- Joined: May 7th, 2007, 12:07 pm
Re: Block "Are you sure you want to exit this page" pop-up
You could block javascript for those pages, or you could simply disable the onunload and onbeforeunload commands so that they cannot create popup windows by adding these two preferences into about:config.
user_pref("dom.disable_window_onbeforeunload", true);
user_pref("dom.disable_window_onunload", true);
If you really want to disable all possible actions of those commands, you could use a web filtering application to change the commands into nonsense. Proxomitron is such an application.
user_pref("dom.disable_window_onbeforeunload", true);
user_pref("dom.disable_window_onunload", true);
If you really want to disable all possible actions of those commands, you could use a web filtering application to change the commands into nonsense. Proxomitron is such an application.
-
- Posts: 440
- Joined: July 16th, 2004, 6:47 pm
Re: Block "Are you sure you want to exit this page" pop-up
I'm reviving this old thread because the instructions no longer seem to work using Firefox 4.
Testing using this page: http://www.4guysfromrolla.com/demos/OnB ... dDemo1.htm
Am hoping someone has an updated approach on making this work.
Testing using this page: http://www.4guysfromrolla.com/demos/OnB ... dDemo1.htm
Am hoping someone has an updated approach on making this work.
-
- Posts: 8779
- Joined: May 7th, 2007, 12:07 pm
Re: Block "Are you sure you want to exit this page" pop-up
That thing that popped up was a message box, not a full-fledged popup window. The dom... commands I think just block popup windows. If you can use BFilter, perhaps you could block that if you made a new filter that substituted a nonsense string for onbeforeunload. Mind you, I have no idea if BFilter will work with Snow Leopard.
-
- Posts: 440
- Joined: July 16th, 2004, 6:47 pm
Re: Block "Are you sure you want to exit this page" pop-up
Thanks. That helps clarify why things weren't going as I expected.