rmcgirr83/elonw

Open in new tab instead of window

Closed this issue · 6 comments

Is there a way that I can change something in this code to open in a new tab rather than a window? If there is what exact code? I don't know PHP so I need the exact code changes needed. Thanks.

That option has been enabled ever since tabs made its way to Firefox way back when I started using tabs in circa 2007 or thereabouts and it's on now as you can see in this image. I can tell you your last version did open the link in a new tab, but this version for what ever reason opens in a new window. Though, this is from withen XAMPP at the moment. I'll test on my live site to see if the issue still persists. It's possible XAMPP messes with the code somehow.

1

1.0.6 used this
window.open(href);
1.0.10 uses this
window.open(href, '_blank', 'noreferrer, noopener');

Even with that change new links are opening in a new tab for me (XAMPP/WAMP or otherwise).

It appears in my browser called Pale Moon it opens the link in a new window. In Firefox this doesn't happen. I even tried safe mode with Pale Moon and a plain vanilla portable version of Pale Moon. However, this extension does open in a new tab. I tried to see what the code difference is, but I couldn't find it and I don't know PHP. https://github.com/Mar-tin-G/ExternalLinkInNewWindow

It uses the same code albeit in a different way.

target="_blank" rel="noopener noreferrer nofollow"

If that extension works for you, then use it I guess.