Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

window.open Opens in New Tab

Causes URIs opened with window.open to instead open in a new tab.

Does what the summary says, with one short line of code. Unfortunately, it uses unsafeWindow. I tried the alternative methods listed here: http://wiki.greasespot.net/UnsafeWindow , but they didn't work. I don't see how my use could be dangerous, though.

EDIT: Descriptor has kindly shown a way to do this with the browser. about:config > browser.link.open_newwindow = 3 > browser.link.open_newwindow.restriction = 0. I haven't tested this yet, so I'll leave the script (and this comment) here for now.

EDIT: The built-in way works great, but I'll leave the script up for those who don't know of the preferences.




Jul 2, 2008
SethA User

true... but the about:config is not quite good enough...
(read first... then comment... )

browser.link.open_newwindow.restriction

Possible values and their effects
[edit]
0

Divert all links according to browser.link.open_newwindow. (Default in Firefox 1.0.x and SeaMonkey)

This includes:

* All HTML links with target="_blank".
* All JavaScript calls to window.open().

[edit]
1

Do not divert any links (browser.link.open_newwindow will have no effect).
[edit]
2

Divert all links according to browser.link.open_newwindow, unless the new window specifies how it should be displayed. (Default in Firefox 1.5 and later and Camino 1.5)

This includes:

* All links with target="_blank".
* JavaScript calls to window.open() without the "features" parameter (3rd parameter).

This does not include:

* JavaScript calls to window.open() <u>with the "features" parameter</u> (3rd parameter).

what I REALLY need to know is how to get Those js windows to open in tabs...
(i have a thread at mozillazine about it... go there for more details... and if ya can help, i'd be everso glad... thanks)

'javascript'
http://forums.mozillazine.org/viewtopic.php?p=3...

 
Jul 8, 2007
Descriptor Scriptwright

It's built into the browser already...
browser.link.open_newwindow
browser.link.open_newwindow.restriction

See also this thread.

 
Jul 8, 2007
Neewb Scriptwright

Sweeet one liner. I love one liners!

 
Jul 8, 2007
Peter Bunyan Scriptwright

I don't know why nobody thought of this before! It's incredibly useful, and it's just one line of code. You can't get much more elegant than that :)

10 / 10, definitely.

You could comment on this script if you were logged in.