_blank in same tab, extenal links in new tab

Discussion of general topics about Mozilla Firefox
User avatar
gemal
Posts: 223
Joined: November 7th, 2002, 3:49 am
Location: Copenhagen, Denmark
Contact:

_blank in same tab, extenal links in new tab

Post by gemal »

I'm trying to find out if it's possible to have the following configuration in Firefox 3:

All links that have _blank or _new should open in the same tab as the now that I'm using.
Links from extenal applications should open in a new tab

If I have:
browser.link.open_newwindow.restriction = 2
browser.link.open_newwindow = 1

links with _blank or _new opens in the same tab, BUT links from extenal applications opens in the same tab.

Firefox 3 doesn't seem to use browser.link.open_external anymore

Any clues?
Henrik Gemal
Mozilla Evangelist
User avatar
alterna
Posts: 3993
Joined: January 16th, 2007, 8:27 am
Location: Big Apple

Re: _blank in same tab, extenal links in new tab

Post by alterna »

Try middleclicking the links that you want opened in new tab.
"So it goes" - Kurt Vonnegut, Jr.
User avatar
gemal
Posts: 223
Joined: November 7th, 2002, 3:49 am
Location: Copenhagen, Denmark
Contact:

Re: _blank in same tab, extenal links in new tab

Post by gemal »

alterna wrote:Try middleclicking the links that you want opened in new tab.


Pretty hard when it's links from extenal apps, like when I click on a link in Thunderbird, that I want to open in a new tab :)
Henrik Gemal
Mozilla Evangelist
User avatar
alterna
Posts: 3993
Joined: January 16th, 2007, 8:27 am
Location: Big Apple

Re: _blank in same tab, extenal links in new tab

Post by alterna »

Ah, I was too speedy to respond...:)

Does rightclick > open in new tab work?
(Don't use T-Bird myself, is there such an option?)
"So it goes" - Kurt Vonnegut, Jr.
User avatar
gemal
Posts: 223
Joined: November 7th, 2002, 3:49 am
Location: Copenhagen, Denmark
Contact:

Re: _blank in same tab, extenal links in new tab

Post by gemal »

alterna wrote:Ah, I was too speedy to respond...:)

Does rightclick > open in new tab work?
(Don't use T-Bird myself, is there such an option?)


Nope can do that. I also includes applications that just says "open link in default browser". And then with my current setup loads the page in my current tab, which is bad... :(
Henrik Gemal
Mozilla Evangelist
User avatar
alterna
Posts: 3993
Joined: January 16th, 2007, 8:27 am
Location: Big Apple

Re: _blank in same tab, extenal links in new tab

Post by alterna »

Why not use a different profile as default? I have a very simple, vanilla profile as my default, which loads rapidly , and run my add-ons laden profile for regular use. Then, whenever I load an external link (say, saved webpage in documents), it quickly loads in a separate window in the default profile.

By default, I mean an exe without the no-remote command.

see http://kb.mozillazine.org/Profile_Manager
"So it goes" - Kurt Vonnegut, Jr.
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: _blank in same tab, extenal links in new tab

Post by Frank Lion »

alterna wrote:I have a very simple, vanilla profile as my default,...

How come you're using Vanilla's profile? :)

Lookit, you're the guy who knows where to find stuff, help me out here. Where can I find a replacement for Click2Tab for Firefox 3? I don't mind having to middle click Bookmark and History links into new tabs when I'm working with virgin testing profiles, but I sure don't want to do this now on my normal profile. I also sure don't want to use a 1600KB TabMixPlus to do a job that can be done by a 50KB one.

Finally (I've always wanted to use this line :)) .... And yes, I have searched. And yes, I found damn all. (you get the drift...and yes.)

@gemal, don't mind me, I was just passing through and you reminded me. :P
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
User avatar
alterna
Posts: 3993
Joined: January 16th, 2007, 8:27 am
Location: Big Apple

Re: _blank in same tab, extenal links in new tab

Post by alterna »

^Sorry, Frank, no joy here. :(

That was one of the first things I installed in a new profile..........and no. :)
"So it goes" - Kurt Vonnegut, Jr.
zeniko
Posts: 201
Joined: October 19th, 2007, 4:50 am
Location: Swiss Confederation
Contact:

Re: _blank in same tab, extenal links in new tab

Post by zeniko »

If you don't want to use an extension you'll probably have to jump through the following hoop:

1. userContent.css

Code: Select all

a[target="_blank"], a[target="_new"] { -moz-binding: url(userBindings.xml#no_blank); }

2. userBindings.xml (a new file in the same directory)

Code: Select all

<bindings xmlns="http://www.mozilla.org/xbl">
   <binding id="no_blank">
      <implementation>
         <constructor><![CDATA[
            this.removeAttribute("target");
         ]]></constructor>
      </implementation>
   </binding>
</bindings>
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: _blank in same tab, extenal links in new tab

Post by Frank Lion »

alterna wrote:^Sorry, Frank, no joy here. :(

That was one of the first things I installed in a new profile..........and no. :)

...and yes. :)

Bookmarks in BTF and Bookmarks Menu, urlbar, searchbar all open in New Tabs.....cost? - 19.3KB :P

Here's the gist. There used to be a guy around called zeniko (no idea where he went, nice guy, knew his stuff) did an extension called userChromeJS, which is now taken over by someone else. I'm sure you've used it and I used to on FF2.

Anyway, go here - http://userchromejs.mozdev.org/ spend time searching for the usual mozdev hidden link here :) - http://downloads.mozdev.org/userchromej ... JS-1.0.xpi and install.

Go here and read (good French guy, called x2b4) - http://www.x2b4.com/2008/06/01/how-to-o ... firefox-3/ or if you just want to cut to the chase, (do read the 3.1 stuff though) then just go here - http://www.x2b4.com/wp-content/uploads/ ... Tabs.uc.js and copy and paste that lot onto the end of your new userChrome.js in the profile folder. Save, restart, done. You can, if you want, do the universal loader some other time.

Just Bookmark and History trees to do now....and yes! :)
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
User avatar
alterna
Posts: 3993
Joined: January 16th, 2007, 8:27 am
Location: Big Apple

Re: _blank in same tab, extenal links in new tab

Post by alterna »

and Yes! ...... :)
"So it goes" - Kurt Vonnegut, Jr.
bielawski
Posts: 252
Joined: November 21st, 2007, 11:27 am

Re: _blank in same tab, extenal links in new tab

Post by bielawski »

Frank Lion wrote:[...]zeniko (no idea where he went, [...]

He's quite actively fixing bugs in mozilla, even if his add-ons aren't seeing any updates.
User avatar
Frank Lion
Posts: 21173
Joined: April 23rd, 2004, 6:59 pm
Location: ... The Exorcist....United Kingdom
Contact:

Re: _blank in same tab, extenal links in new tab

Post by Frank Lion »

bielawski wrote:
Frank Lion wrote:[...]zeniko (no idea where he went, [...]

He's quite actively fixing bugs in mozilla, even if his add-ons aren't seeing any updates.

He was also quite actively posting immediately before my post ...it...was...a...joke. See? ;)
"The only thing necessary for the triumph of evil, is for good men to do nothing." - Edmund Burke (attrib.)
.
User avatar
xeen
Posts: 137
Joined: June 24th, 2004, 6:13 am

Re: _blank in same tab, extenal links in new tab

Post by xeen »

zeniko wrote:If you don't want to use an extension you'll probably have to jump through the following hoop:


Does this work with javascript window.open() methods?
zeniko
Posts: 201
Joined: October 19th, 2007, 4:50 am
Location: Swiss Confederation
Contact:

Re: _blank in same tab, extenal links in new tab

Post by zeniko »

xeen wrote:Does this work with javascript window.open() methods?

I'm afraid that for that it'd have to become significantly more sophisticated - to the point where you might want a dedicated extension instead. OTOH you could also implement the change suggested by Jesper through a similar XBL binding, which'd however also be a cheap hack for a proper extension (or a userChrome.js snippet).
Post Reply