Some links open in current tab when middle clicked (Pornhub.com)

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
Windows95
Newbie
Newbie
Posts: 6
Joined: 2021-02-17, 11:14

Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Windows95 » 2021-02-17, 11:20

As of late on pornhub.com, middle clicking a related item from a video page or an item from the search result page causes the target link to open in the current tab rather than in a new tab (this also happens with a right click).

I also noticed this behavior occasionally on other sites. Anyone know why this happens? It's very annoying. Hopefully there's some way to block the script or whatever triggering this.

User avatar
jars_
Lunatic
Lunatic
Posts: 397
Joined: 2016-12-27, 00:12

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by jars_ » 2021-02-18, 11:14

Yes, I can confirm that behavior.
The culprit is a certain 'vue'. Another """progressive framework""" :cry:
I blocked the path phncdn.com/www-static/js/lib/vue/* and everything seems to be fine. ...except that the video doesn't work :lol:

User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 195
Joined: 2020-03-02, 16:04

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Nuck-TH » 2021-02-18, 13:36

It is either framework or deliberate decision to consume middle click event on links.
Typical modern "we know better than users what that users want" type of shit. I'm really tired of it.

User avatar
jars_
Lunatic
Lunatic
Posts: 397
Joined: 2016-12-27, 00:12

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by jars_ » 2021-02-18, 13:56

I'm really tired of it.
True. +1

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Moonchild » 2021-02-18, 14:14

In the case of pornhub it's likely just as much a case of "we don't want people to rip off our porn media"
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

_yuyu_
Lunatic
Lunatic
Posts: 253
Joined: 2015-03-02, 14:18

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by _yuyu_ » 2021-02-18, 15:29

Pale Moon 32-bit on Win 7 x64

User avatar
jars_
Lunatic
Lunatic
Posts: 397
Joined: 2016-12-27, 00:12

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by jars_ » 2021-02-18, 16:02

_yuyu_ yes, it works!

User avatar
Windows95
Newbie
Newbie
Posts: 6
Joined: 2021-02-17, 11:14

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Windows95 » 2021-02-18, 19:33

_yuyu_ wrote:
2021-02-18, 15:29
Blocking https://ss.phncdn.com/head/load-1.0.3.js helps.
For me that file was never being loaded, but the following fixed the issue on video pages:
||phncdn.com/www-static/js/lib/generated-lib.js$script,domain=www.pornhub.com,important

Unfortunately it's still not working on the search results page. Blocking either of the following fixes it on that page, but breaks playback...
https://ei.phncdn.com/www-static/js/phub.js
https://ei.phncdn.com/www-static/js/lib ... s-1.0.0.js

The amount of crap this site runs on every page is unbelievable. If anyone has a definitive fix please share (maybe a way to prevent Pale Moon from executing mouse events on a link-middleclick altogether?).

User avatar
Sob__
Lunatic
Lunatic
Posts: 251
Joined: 2014-02-17, 01:12
Location: CZ

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Sob__ » 2021-07-15, 00:46

Windows95 wrote:
2021-02-18, 19:33
(maybe a way to prevent Pale Moon from executing mouse events on a link-middleclick altogether?).
This is my new Christmas wish, an option to completely hide middle clicks from pages. When enabled, it should treat middle click on link as system function, open link in new tab, and page shouldn't even know that anything happened.

Few days ago some stupid ads started to do this, so I middle-click on link to open it in new tab, but instead an ad shows and then the link opens in current tab. I don't mind the ads too much. They are pointless, because they never show anything interesting, but I'm trying to be nice guy and not block them if I don't have to. But this ruins my browsing, I'm opening links in background tabs all the time. When this happens and I navigate back, the original page is reloaded, so for example when there's some highlighting of new posts, it's updated to current state and I don't see previously unread ones any more. Or when page uses the retarded endless scrolling and I was already way down, it gets reset to beginning, which is even worse.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Moonchild » 2021-07-15, 04:07

So, try some of the other actions that do the same thing: Ctrl+leftclick, or right-click and select "open in new tab"
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Sob__
Lunatic
Lunatic
Posts: 251
Joined: 2014-02-17, 01:12
Location: CZ

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Sob__ » 2021-07-15, 04:26

That doesn't really solve my problem, which is that this thing happens unexpectedly. And when it does, it's too late to take it back, because it already influenced something. I could remember what websites have this problem and not use middle click there, but it's not very user-friendly solution. And if I want to be sure that it won't suddenly happen on other websites, the safe way would be to not use middle click to open links in background tabs at all. But my goal is to use it and not worry about it doing something else.

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Lunokhod » 2021-07-16, 19:51

viewtopic.php?f=3&t=27010&p=216836&hili ... ck#p216836
I don't think from reading the above explanation, this other topic relates to the original problem described, but for more general situations with middle click not going where you expect, it might help explain them.
Wait, it's all Ohio? Always has been...

User avatar
Windows95
Newbie
Newbie
Posts: 6
Joined: 2021-02-17, 11:14

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Windows95 » 2021-07-16, 22:56

Moonchild wrote:
2021-07-15, 04:07
So, try some of the other actions that do the same thing: Ctrl+leftclick, or right-click and select "open in new tab"
Hi Moonchild, unfortunately this doesn't work for many sites including the aforementioned pornhub.com. Try middle clicking/right clicking/ctrl-clicking an item from the search results. They ALL open in the current tab.

The context menu doesn't even display even when the Javascript setting "Allow scripts to disable or replace context menus" is disabled. The only way I found to open a new tab is to physically drag the link to the tab bar which is extremely time consuming.

I understand it's the site that's at fault, but since it works in every other browser, are there any plans to address this within Pale Moon?
A new about:config or advanced JS setting for "force open new tab on link middle click" and a fix for the "Allow scripts to disable or replace context menus" option would be good (the site should not be able to see the middle/right click event respectively).

New Tobin Paradigm

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by New Tobin Paradigm » 2021-07-16, 23:16

I don't see how this is actually an issue. So I am inclined to judge it as RESOLVED INVALID.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Moonchild » 2021-07-17, 01:08

Windows95 wrote:
2021-07-16, 22:56
unfortunately this doesn't work for many sites including the aforementioned pornhub.com. Try middle clicking/right clicking/ctrl-clicking an item from the search results. They ALL open in the current tab.
Unfortunately for you, web content has control over itself by design.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Sob__
Lunatic
Lunatic
Posts: 251
Joined: 2014-02-17, 01:12
Location: CZ

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Sob__ » 2021-07-17, 20:41

New Tobin Paradigm wrote:
2021-07-16, 23:16
I don't see how this is actually an issue.
Middle click on link to open it in background tab is useful and standard function, expected behaviour, and it's annoying when some page decides to deliberately break it. It was never really guaranteed that it can't happen, so it's not like something is broken in browser. But now when it's happening, it would be nice to let user be in control and decide what the behaviour should be. If user says that it should open link in background tab (which again is standard and expected), page says it shouldn't, it should be user who should win.

New Tobin Paradigm

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by New Tobin Paradigm » 2021-07-17, 23:08

Sorry but the page being able to redefine click behavior is part of the spec.

User avatar
Sob__
Lunatic
Lunatic
Posts: 251
Joined: 2014-02-17, 01:12
Location: CZ

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Sob__ » 2021-07-18, 17:56

For my own use, for middle button, I'd gladly take this away from pages. I've never seen one needing middle button for anything useful, so there would be no loss. If someone wanted to fix (or break, depending on how you see it) this, can you tell, as someone who knows Pale Moon's internals, if that's something an extension could do, or if it would require modifications in browser's code? The latter would be probably out of the question, as I don't suppose that you'd want to include it, and I'm not going to be building my own browser only because of this.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Moonchild » 2021-07-18, 19:20

What part of "breaking this would break with the spec" didn't you understand? This isn't something you can or should do trivially.
It's potentially possible with an extension to intercept all mouse events, but it would be rather specific, and with the risk of breaking website operation when done.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Sob__
Lunatic
Lunatic
Posts: 251
Joined: 2014-02-17, 01:12
Location: CZ

Re: Some links open in current tab when middle clicked (Pornhub.com)

Unread post by Sob__ » 2021-07-18, 22:54

Oh no, I did understand, it's just that this broken state (i.e. pages not getting events for middle mouse button) would work better for me than current correct one. I also understand that I can't expect you to add such option. Let's go play with extensions! ;)

Locked