MozillaZine

Sometimes: No option to open link to a new tab

User Help for Mozilla Firefox
T-buch
 
Posts: 34
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Post Posted November 29th, 2019, 9:36 pm

Sometimes you dont have the option to open a link to a new tab (mouse click + CTRL) -Why is that? and can it be bypassed
Last edited by LIMPET235 on November 30th, 2019, 4:41 am, edited 1 time in total.
Reason: Some slight text editing....as the OP noted.

DanRaisch
Moderator

User avatar
 
Posts: 122368
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted November 30th, 2019, 4:42 am

Can you provide3 an example of such a URL/link?

T-buch
 
Posts: 34
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Post Posted November 30th, 2019, 7:19 am

https://www.tvguide.dk/ - the pictures at the top of the page

therube

User avatar
 
Posts: 20102
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted November 30th, 2019, 7:32 am

You can; right-click, then Ctrl+View Image (or right-click, then center-click while over View Image).
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

T-buch
 
Posts: 34
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Post Posted November 30th, 2019, 7:41 am

This showing the pic - There is a url "under" the image (sorry if i not give the correct technicology explanation)

DanRaisch
Moderator

User avatar
 
Posts: 122368
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted November 30th, 2019, 9:11 am

There's a lot of scripts running on that site that might be intercepting Firefox standard commands.

T-buch
 
Posts: 34
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Post Posted November 30th, 2019, 11:07 am

but can it be ignored?

morat
 
Posts: 3579
Joined: February 3rd, 2009, 6:29 pm

Post Posted November 30th, 2019, 1:39 pm

The img element uses a click event listener to change the current page.

WaltS48

User avatar
 
Posts: 4098
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Post Posted November 30th, 2019, 4:19 pm

morat wrote:The img element uses a click event listener to change the current page.


That means it can't be ignored?

If I click an image a new page opens with a complete article, but there is no way to open that article in a new tab.

https://www.tvguide.dk/nyheder/81629/sa ... ns-er-slut
Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5

jscher2000

User avatar
 
Posts: 10772
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted December 1st, 2019, 3:27 pm

If you right-click the element and Firefox doesn't show Link-specific items at the top of the context menu, then it is not a link and tricks that work with links are unlikely to work.

T-buch
 
Posts: 34
Joined: August 14th, 2010, 4:38 am
Location: Denmark

Post Posted December 2nd, 2019, 12:34 am

Thanks enlighten me
Sometimes I find that links (which are obviously not the right way to describe them, sorry) open up as a small pop-up window - for example, a video that starts.
I assume there isn't a trick, either, that can make that video open in a new tab? Are there ways to find a direct address for these kind of video links?

WaltS48

User avatar
 
Posts: 4098
Joined: May 7th, 2010, 9:38 am
Location: Pennsylvania, USA

Post Posted December 2nd, 2019, 6:33 am

jscher2000 wrote:If you right-click the element and Firefox doesn't show Link-specific items at the top of the context menu, then it is not a link and tricks that work with links are unlikely to work.


How does clicking one of those elements on that site, open the page with a text article along with the image if it is not a link?

JavaScript?
Linux Desktop - AMD Athlon(tm) II X3 455 3.3GHz | 8.0GB RAM | GeForce GT 630
Windows Notebook - AMD A8 7410 2.2GHz | 6.0GB RAM | AMD Radeon R5

dickvl

User avatar
 
Posts: 52932
Joined: July 18th, 2005, 3:25 am

Post Posted December 2nd, 2019, 7:14 am

(wrong thread)
Last edited by dickvl on December 3rd, 2019, 2:46 pm, edited 1 time in total.

morat
 
Posts: 3579
Joined: February 3rd, 2009, 6:29 pm

Post Posted December 2nd, 2019, 7:40 am

@WaltS48

Here is a code example that creates a click event listener on Walt's avatar that opens the faq page.

Code: Select all
(function () {
  var imgs = document.querySelectorAll('img[src$="1380795_1287423495.jpg"]');
  for (var i = 0; i < imgs.length; i++) {
    imgs[i].addEventListener("click", function () {
      window.location.href = "http://forums.mozillazine.org/faq.php";
    }, false);
  }
})();

You can run the code in the console, then click on Walt's avatar to test.

i.e. Tools > Web Developer > Web Console (Ctrl+Shift+K)

A link uses an anchor element with the href attribute.

http://www.w3schools.com/html/html_links.asp

jscher2000

User avatar
 
Posts: 10772
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted December 3rd, 2019, 2:27 pm

WaltS48 wrote:
jscher2000 wrote:If you right-click the element and Firefox doesn't show Link-specific items at the top of the context menu, then it is not a link and tricks that work with links are unlikely to work.

How does clicking one of those elements on that site, open the page with a text article along with the image if it is not a link?

JavaScript?

Yes, exactly. For example, window.open() method or location.href = new URL.

Return to Firefox Support


Who is online

Users browsing this forum: Google [Bot], kerft and 9 guests