Hi,
Thanks for everyone's advice so far. It looks like modifying the source
code for window.open is a nontrivial task and so I will get back to
what I originally wanted to do. I will try to be a little bit more
clear. I would like to prevent sites from popping up new browser
windows. Since I want other javascript functions to work, I only want
to disable window.open. This functionality is described exactly in bug
# 292346 (http://bugzilla.mozilla.org/show_bug.cgi?id=29346).
In reading the comments for bug 292346
there seems to be a way to block popup windows right now but there is
not yet a user interface. Instead it appears you can set the options in
prefs.js.
But I have followed the instructions at the comment sections there but
have no luck in preventing the sample site
(http://www.wpi.edu/~dpotter/infinite.html)from popping up infinite
windows. I have tried daily mozilla build from the Dec28 2000 and also
M18 and Mozilla 0.6.
Has anyone been able to block popup windows ? The sample site I have
been using is
http://www.wpi.edu/~dpotter/infinite.html
The relevant parts from the bug comments are pasted below.
Any help would be greatly appreciated.
regards
Relevant comments from bug 292346:
------- Additional Comments From Mitchell Stoltz 2000-10-11 11:38 ------
-
Jake,
You can block popups right now by editing your prefs file, see
http://www.mozilla.org/projects/security/components/configPolicy.html
------- Additional Comments From Martin B�hr 2000-10-20 03:24 -------
have you tried it?
on M18 i couldn't get http://www.wpi.edu/~dpotter/infinite.html to stop
popping
up windows with the descriptions given on
http://www.mozilla.org/projects/security/components/configPolicy.html
i tried these:
pref("capability.principal.default.window.open", "noAccess"); pref
("capability.policy.strict.sites","http://www.wpi.edu"); pref
("capability.principal.window.open", "noAccess"); user_pref
("capability.principal.default.window.open", "noAccess"); user_pref
("capability.policy.strict.sites","http://www.wpi.edu"); user_pref
("capability.principal.window.open", "noAccess");
------- Additional Comments From Mitchell Stoltz 2000-10-20 11:52 ------
-
Sorry, the instructions on that page are slightly wrong. All pref lines
should
start with capability.policy, not capability.principal. I will fix this
soon.
In article <930dr3$1e5$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Hi,
>
> In reading the comments for bug 292346
> (http://bugzilla.mozilla.org/show_bug.cgi?id=29346) there seems to be
a
> way to block popup windows right now.
>
> But I have followed the posting there but have no luck in preventing
the
> sample site (http://www.wpi.edu/~dpotter/infinite.html)from popping up
> infinite windows. I am using the latest daily mozilla build from the
> Dec28 2000.
>
> The relevant parts from the bug comments are pasted below. Has anyone
> been able to block popups? The sample site I have been using is
> http://www.wpi.edu/~dpotter/infinite.html
>
> Any help would be greatly appreciated.
> regards
>
> ------- Additional Comments From Mitchell Stoltz 2000-10-11 11:38
> -------
>
> Jake,
> You can block popups right now by editing your prefs file, see
> http://www.mozilla.org/projects/security/components/configPolicy.html
>
> ------- Additional Comments From Martin B�hr 2000-10-20 03:24 -------
>
> have you tried it?
> on M18 i couldn't get http://www.wpi.edu/~dpotter/infinite.html to
stop
> popping
> up windows with the descriptions given on
> http://www.mozilla.org/projects/security/components/configPolicy.html
>
> i tried these:
>
> pref("capability.principal.default.window.open", "noAccess");
> pref("capability.policy.strict.sites","http://www.wpi.edu");
> pref("capability.principal.window.open", "noAccess");
> user_pref("capability.principal.default.window.open", "noAccess");
> user_pref("capability.policy.strict.sites","http://www.wpi.edu");
> user_pref("capability.principal.window.open", "noAccess");
>
> ------- Additional Comments From Mitchell Stoltz 2000-10-20 11:52
> -------
>
> Sorry, the instructions on that page are slightly wrong. All pref
lines
> should
> start with capability.policy, not capability.principal. I will fix
this
> soon.
>
> Sent via Deja.com
> http://www.deja.com/
>
Sent via Deja.com
http://www.deja.com/