How to deal with Javascript that opens links in a popup window instead of a new tab?

0

I absolutely don't want to have Firefox open a new window.

Is there an extension that could put the window back in the Firefox window as a tab ?

I have already activated an option that should prevent this (open new tab instead of a new window), but some people don't want their site to be correctly referenced and used tricks like this which circumvent this setting:

function popitup(id) {
    url="http://example.net/play.php?id="+id;
newwindow=window.open(url,'Video_Player','height=780,width=930');
if (window.focus) {newwindow.focus()}
return false;
}

PS: This is not really a quality site, but here is where I found this: http://zomobo.net/stm32f4discovery. The function is in the file: ajxfun.js

alecail

Posted 2012-11-21T10:37:43.890

Reputation: 453

Answers

1

You can set browser.link.open_newwindow to 3 and browser.link.open_newwindow.restriction to 2 under about:config or select the following option under Tools menu / Options / Tabs:

1

However, as the browser.link.open_newwindow.restriction page states:

This [diverting all links] does not include: JavaScript calls to window.open() with the "features" parameter (3rd parameter).

Thus since that page is using the 3rd param and specifying a height and width for the popup, it is allowed to break free and open a new window. (I don't understand the point of this BTW. If it is a user preference, then why leave this one loophole for obnoxious webmasters to inevitably exploit and thus irritate us?)

Anyway, the following add-ons might help.

  1. Tab Utilities has a single window mode that you can check out, among other "Force" options:

    2

  2. So does Tab Mix Plus:

    3

Karan

Posted 2012-11-21T10:37:43.890

Reputation: 51 857