Links no longer open in a new tab

User Help for Mozilla Firefox
Kracov
Posts: 227
Joined: February 25th, 2005, 1:16 pm

Links no longer open in a new tab

Post by Kracov »

I had firefox 45 for a long while and I noticed clicking on links in reddit and other sites would no longer open in a new tab. I have enabled TMP's option of links to other sites opening in a new tab. I also have a greasemonkey script where external links would open in a new tab. That was all working for a long while and stopped for whatever reason. I don't update often. So today I tried firefox 47 and I still cannot get links to open in a new tab. The only solution is to use the greasemonkey script configured to open ALL links in a new tab which can be annoying. I'm hoping someone can help me with this greasemonkey script

Code: Select all

var x = document.getElementsByTagName('a');

for(var i=0;i<x.length;i++)
{
    x[i].setAttribute('target','_blank');
}
Firefox 109 Windows 10
User avatar
therube
Posts: 21722
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Links no longer open in a new tab

Post by therube »

Link to reddit & other sites?
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
Kracov
Posts: 227
Joined: February 25th, 2005, 1:16 pm

Re: Links no longer open in a new tab

Post by Kracov »

What? You mean you need the links? It affects most sites. http://www.reddit.com
Firefox 109 Windows 10
User avatar
LIMPET235
Moderator
Posts: 39961
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Re: Links no longer open in a new tab

Post by LIMPET235 »

Try running in Firefox "Safe Mode".
> http://kb.mozillazine.org/Safe_Mode
or... Help > Re-start with Addons disabled or hold down your Shift key as you click the Firefox short cut..
Do not check any boxes.
This is a fault finding mode.
NB: Be careful of the "Delete all bookmarks except for back-ups" option.

Don't add any extensions or themes until it's working O.K.
If Firefox is O.K. in Safe Mode then it's possibly an extension/theme...etc causing it.
Run Firefox in normal mode & disable them all. Re-start Firefox.
Enable each in turn, or by ½'s, re-starting Firefox each time, till the faulty extension is found.
Either update or un-install it.

See this incomplete list,
> http://kb.mozillazine.org/Problematic_extensions

When in Safe Mode...
* The status of plug-ins is not affected.
* Custom preferences are not affected.
* All extensions are disabled.
* The default theme is used, without a persona.
* userChrome.css and userContent.css are ignored.
* The JIT/Javascript compiler is disabled.
* The default toolbar layout is used.
* Hardware acceleration is disabled.

Moving to Firefox Support...
[Ancient Amateur Astronomer.]
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.

(Always choose the "Custom" Install.)
Kracov
Posts: 227
Joined: February 25th, 2005, 1:16 pm

Re: Links no longer open in a new tab

Post by Kracov »

This does happen on a clean profile, and tried installing tab mix plus. Links from reddit still won't open in a new tab.
Firefox 109 Windows 10
User avatar
therube
Posts: 21722
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Links no longer open in a new tab

Post by therube »

By default, I see no reason why reddit links should open anywhere except in the current tab.

Though...

SeaMonkey (& I'd image FF too):
Links... Set, Open links meant to open a new window in: -> A new tab in the current window.
Bookmarklet, target new windows.

Load www.reddit.com, click the bookmarklet.
Click a link on reddit.
It gets redirected to a new tab in the current window.
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
Kracov
Posts: 227
Joined: February 25th, 2005, 1:16 pm

Re: Links no longer open in a new tab

Post by Kracov »

I've never used bookmarklets. What are they?
Firefox 109 Windows 10
User avatar
therube
Posts: 21722
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Links no longer open in a new tab

Post by therube »

Just some JavaScript.

Code: Select all

javascript:(function(){var%20x,i;%20x=document.links;%20for(i=0;i<x.length;++i)%20{%20x[i].target="_blank";%20}%20})();
All it does is to change "target" "_blank", just like you might do with Greasemonkey.
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
User avatar
dfoulkes
Posts: 22525
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Re: Links no longer open in a new tab

Post by dfoulkes »

Kracov wrote:This does happen on a clean profile, and tried installing tab mix plus. Links from reddit still won't open in a new tab.
I'll assume that in that clean profile... all you did was install TMP to test? ... and you did modify its options for Events (Tab opening)? ...

FWIW ... I use TMP and I clicked on the Reddit link and it opened in a new Tab....

You might think about posting a screen-shot of that area of TMP options.

Edit... also chech or post a screen-shot of the Options for Links...
As you can see she's (The CAT) always alert and on the prowl for Meoware !!
User avatar
Daifne
Moderator
Posts: 123071
Joined: July 31st, 2005, 9:17 pm
Location: Where the Waters Meet, Wisconsin

Re: Links no longer open in a new tab

Post by Daifne »

In TMP's options under Links, uncheck "Open links with a target attribute in the current tab". That fixed it for me when this started happening yesterday. Why it happened, I have no clue.
Kracov
Posts: 227
Joined: February 25th, 2005, 1:16 pm

Re: Links no longer open in a new tab

Post by Kracov »

Daifne- it's already been unchecked

therube- I still don't understand how to use bookmarklets I even googled it. I also pasted that code into the greasemonkey script it made it function improperly

dfoulkes- I had saved TMP's options into the clean profile. http://i.imgur.com/AgyHZ22.png
Firefox 109 Windows 10
User avatar
dfoulkes
Posts: 22525
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Re: Links no longer open in a new tab

Post by dfoulkes »

Weird... I reviewed that options image and as far as I can tell... it is set up the same way as mine is...

I also see some other options in TMP about middle clicking to open (or not) links in the same tab... so, I ask this... do you use the standard left button to activate stuff? .. or are you using the middle button?

EDIT ....


I use a few bookmarklets and they can have lots of neat functionality... You have 'therube's
code up there... this is one that I use... and all I did was create a new bookmark up on my bar, edit the bookmark's Properties and the code gets placed in the Location line (box) ... save the change and then all you need to do is left click on the bookmarklet and action takes place... the one below displays a history side-bar.

Code: Select all

chrome://browser/content/history/history-panel.xul


therube- I still don't understand how to use bookmarklets I even googled it. I also pasted that code into the greasemonkey script it made it function improperly
Last edited by dfoulkes on July 12th, 2016, 9:50 am, edited 1 time in total.
As you can see she's (The CAT) always alert and on the prowl for Meoware !!
User avatar
therube
Posts: 21722
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Links no longer open in a new tab

Post by therube »

I still don't understand how to use bookmarklets
URL: https://www.squarefree.com/bookmarklets ... ew_windows

Drag the link, "target new windows" to the "Bookmarks Toolbar".
(You'll have to translate that into FF speak & or add/show that toolbar. Or drag it anywhere that will allow you to drop it.)
[And with that, it's "installed".]

Visit: http://www.reddit.com/
Click the bookmarklet.

Nothing appears to have happened, but the page code has changed.
Now any link you click on reddit should open in a new tab.
(What actually happens also depends on your "Link Behavior" settings. Again what I show in SeaMonkey is easy & straight forward & may need to be "translated" into FF speak.)
Also bookmarklet changes do not persist, so the next time you load reddit, or if you refresh the page, or if you go back a page, then forward again, the changes are lost. (Actually, maybe if the mod'd page is cached, the last might not be true, not sure.)
Anyhow, while the bookmarklet works in a "one time" mode, doing something similar in Greasemonkey should allow it to work "every time" you load reddit (or whatever sites you choose). I don't know Greasemonkey, so whether the JavaScript from a bookmarklet is "plug & play" in Greasemonkey, I wouldn't know?
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
User avatar
dfoulkes
Posts: 22525
Joined: June 28th, 2008, 10:31 pm
Location: Mesquite, Nevada

Re: Links no longer open in a new tab

Post by dfoulkes »

Not sure if you were responding to my above post... about 'not understanding' ... it was an error on my quoting the OP... just saying :lol:
As you can see she's (The CAT) always alert and on the prowl for Meoware !!
Kracov
Posts: 227
Joined: February 25th, 2005, 1:16 pm

Re: Links no longer open in a new tab

Post by Kracov »

I managed to add the bookmarklet by dragging the "target new windows" into the bookmark toolbar. Links to other sites within reddit STILL open in the current page/tab, even with the clean profile.
Firefox 109 Windows 10
Post Reply