为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

How do I prevent new windows?

more options

Greetings,

When I go to thePirateBay.com, a new window opens. The website opens a new window using Javascript (window.open). I've tried opening the site in a Private Window but it doesn't help. How can I prevent new windows from opening?

Thanks, Shane.

Greetings, When I go to thePirateBay.com, a new window opens. The website opens a new window using Javascript (window.open). I've tried opening the site in a Private Window but it doesn't help. How can I prevent new windows from opening? Thanks, Shane.

所有回复 (9)

more options

What do you mean by another window opens? I see two meanings to this.

1) Another window opens without your permission containing an ad 2) A blank window opens

Can you clarify if possible?

Thanks!

more options

Options > Tabs = Open new windows in a new tab instead
Is that check-marked?

more options

It's a new window (not a tab) that is fully maximized and contains an ad.

Let me know if you need anything else.

Shane.

more options

the-edmeister,

Yes, it's checked.

I'm trying to prevent new windows completely for this site. I thought I could do it by opening a New Private Window, but that doesn't seem to work. Is there something that does?

Thanks, Shane.

more options
more options

Thanks.

I'm still going to see if it's possible to do something like this on a per-site basis, instead of implementing this restriction for all websites.

Shane.

more options

It's hard to tell exactly where the popups originate. You can block the in-page ads using the YesScript extension (screen shot attached). I still get a popup randomly, but then I can follow 15 links without one. Not sure what's going on.

more options

I was able to find exactly where the new window opens by using Web Developer > Page Source. Can Firefox disable JavaScript for a single site, or do I have to download the extension you mentioned?

Thanks, Shane.

more options

Using an extension to block JavaScript on one site is easiest. Possibly you could create a rule in user.js/prefs.js as described in this article: http://www-archive.mozilla.org/projec.../ConfigPolicy.html.