Feature request - links open in a new tab

Discuss technical problems and features here
User avatar
leosmith
Brown Belt
Posts: 1416
Joined: Thu Sep 29, 2016 10:06 pm
Location: Seattle
Languages: English (N)
Spanish (adv)
French (int)
German (int)
Japanese (int)
Korean (int)
Mandarin (int)
Portuguese (int)
Russian (int)
Swahili (int)
Tagalog (int)
Thai (int)
Italian (beg)
Language Log: https://forum.language-learners.org/vie ... an#p241749
x 3379
Contact:

Feature request - links open in a new tab

Postby leosmith » Thu Jan 26, 2023 9:08 am

This is not a deal breaker, but it would be nice to have.
3 x
https://languagecrush.com/reading - try our free multi-language reading tool

User avatar
rdearman
Site Admin
Posts: 7318
Joined: Thu May 14, 2015 4:18 pm
Location: United Kingdom
Languages: English (N)
Language Log: viewtopic.php?f=15&t=1836
x 23599
Contact:

Re: Feature request - links open in a new tab

Postby rdearman » Thu Jan 26, 2023 11:07 am

leosmith wrote:This is not a deal breaker, but it would be nice to have.

This actually caused massive wars on the PhpBB developers website with miles of text. Basically, there are a lot of arguments both for and against. The primary one for is allows users to maintain their place on the forum. The main argument against is that it breaks the W3 standards and the user should be allowed to control if they open a new window (tab) and the user should decide if they want to click the link, or right-click the link and allow new windows to open. The other argument against is from a security point of view, but I got tired of reading it all.

The upshot of that discussion was that the developers decided they would strictly follow W3 standards and as of version 3.0 phpBB would no longer automatically open URL's in new windows.

There is an extension which will change the default rules on URL clicking, but it is reported as buggy and only works part of the time. So.... long story short, I'm afraid you're going to have to make a little extra effort and right-click (and/or middle mouse click on Windows) to open in a new window or tab.
7 x
: 56 / 150 Read 150 books in 2024

My YouTube Channel
The Autodidactic Podcast
My Author's Newsletter

I post on this forum with mobile devices, so excuse short msgs and typos.

User avatar
leosmith
Brown Belt
Posts: 1416
Joined: Thu Sep 29, 2016 10:06 pm
Location: Seattle
Languages: English (N)
Spanish (adv)
French (int)
German (int)
Japanese (int)
Korean (int)
Mandarin (int)
Portuguese (int)
Russian (int)
Swahili (int)
Tagalog (int)
Thai (int)
Italian (beg)
Language Log: https://forum.language-learners.org/vie ... an#p241749
x 3379
Contact:

Re: Feature request - links open in a new tab

Postby leosmith » Thu Jan 26, 2023 12:36 pm

Ah, ok. No worries.
1 x
https://languagecrush.com/reading - try our free multi-language reading tool

Odair
Yellow Belt
Posts: 96
Joined: Mon Feb 07, 2022 11:45 am
Languages: en (C1), fr (B2), es (C1), it (B1), pt_br(N)
x 161

Re: Feature request - links open in a new tab

Postby Odair » Thu Jan 26, 2023 1:17 pm

Ctrl+click or pressing down on your mouse wheel will open any link on a new tab.
3 x

User avatar
rdearman
Site Admin
Posts: 7318
Joined: Thu May 14, 2015 4:18 pm
Location: United Kingdom
Languages: English (N)
Language Log: viewtopic.php?f=15&t=1836
x 23599
Contact:

Re: Feature request - links open in a new tab

Postby rdearman » Thu Jan 26, 2023 2:04 pm

Odair wrote:Ctrl+click or pressing down on your mouse wheel will open any link on a new tab.

On Microsoft Windows and most web-browsers. (This is why I'm careful to caveat advice to people, since I don't know their operating system or web-browser. For all I know, Leosmith could be using Lynx inside a Linux terminal window, or using Emacs on a Mac.) :)
3 x
: 56 / 150 Read 150 books in 2024

My YouTube Channel
The Autodidactic Podcast
My Author's Newsletter

I post on this forum with mobile devices, so excuse short msgs and typos.

User avatar
leosmith
Brown Belt
Posts: 1416
Joined: Thu Sep 29, 2016 10:06 pm
Location: Seattle
Languages: English (N)
Spanish (adv)
French (int)
German (int)
Japanese (int)
Korean (int)
Mandarin (int)
Portuguese (int)
Russian (int)
Swahili (int)
Tagalog (int)
Thai (int)
Italian (beg)
Language Log: https://forum.language-learners.org/vie ... an#p241749
x 3379
Contact:

Re: Feature request - links open in a new tab

Postby leosmith » Thu Jan 26, 2023 2:20 pm

rdearman wrote:
Odair wrote:Ctrl+click or pressing down on your mouse wheel will open any link on a new tab.

On Microsoft Windows and most web-browsers. (This is why I'm careful to caveat advice to people, since I don't know their operating system or web-browser. For all I know, Leosmith could be using Lynx inside a Linux terminal window, or using Emacs on a Mac.) :)
I've always just rt clicked.
0 x
https://languagecrush.com/reading - try our free multi-language reading tool

Stefan
Green Belt
Posts: 379
Joined: Sun Dec 20, 2015 9:59 pm
Location: Sweden
Languages: -
x 920
Contact:

Re: Feature request - links open in a new tab

Postby Stefan » Sun Jan 29, 2023 12:50 am

There's probably a setting or generic browser plugin for this but you could use a Tampermonkey script.

I threw this together which allows you to whitelist keywords in URLs such as "#top" to avoid those being opened in a new tab.

Code: Select all

// ==UserScript==
// @name         Open links in a new tab
// @namespace    https://forum.language-learners.org
// @version      0.1
// @match        https://forum.language-learners.org/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=language-learners.org
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const whitelist = [
        "posting.php",
        "#top",
    ];

    for (const link of document.querySelectorAll("a")) {
        if (!whitelist.some(term => link.href.includes(term))) {
            link.target = "_blank";
        }
    }
})();


When a page on this domain is loaded, it iterates through all the links and adds target="_blank" to them which results in them opening in a new tab/window. It's a new tab for me but I believe it used to be window way back. You would need to have Tampermonkey or Greasemonkey installed as a browser plugin. Maybe not the most efficient way to solve it.
2 x


Return to “Technical Support and Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests