搜索 | 用户支持

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

详细了解

How to open links in the same window, without changing preferences?

more options

What I want to know is if there's a way to force a click on a link to open in the current window just one time, if the page was using target=_blank or other methods to open a new tab/window.

The context menu doesn't have an option for that, was hoping for a modifier key option or something, or perhaps a plugin that would add such an option.

I know there's an advanced pref to change the behaviour of clicking on links to control new tabs, windows, etc. I don't want to change the default, I just for certain links want to prevent the new tab on a one-up basis.

(currently on Firefox 30 for Mac)

What I want to know is if there's a way to force a click on a link to open in the current window just one time, if the page was using target=_blank or other methods to open a new tab/window. The context menu doesn't have an option for that, was hoping for a modifier key option or something, or perhaps a plugin that would add such an option. I know there's an advanced pref to change the behaviour of clicking on links to control new tabs, windows, etc. I don't want to change the default, I just for certain links want to prevent the new tab on a one-up basis. (currently on Firefox 30 for Mac)

所有回复 (1)

more options

Firefox actually doesn't have any built-in preference for overriding the target attribute. If you are on a site where you know the link is coded to open in a new tab, currently, the best workarounds are:

  • drag and drop the link on the address bar
  • right-click > Copy Link Location and then paste in the address bar

Neither is convenient...

You might be able to find an add-on for this. For example, Tab Mix Plus, Tab Utilities, and other multi-functional tab-related extensions might have an option to force links into the same tab. In a brief search, I saw one called TargetKiller that is more focused on this but recent reviews mention conflicts with other extensions. If this is a frequent pain point, you could search further on the add-ons site.

Let us know the progress of your search.

Another possibility is to solicit someone to write a userscript. A userscript is a JavaScript add-on that can modify web pages, but not the user interface (for example, it cannot add a right-click context menu item). You need the Greasemonkey extension to run userscripts, and you need to evaluate them carefully because they are not formally reviewed by anyone.

You can contact userscript authors through these sites, and if someone is interested, they'll usually write the script for free and post it for everyone's benefit: