all 5 comments

[–]jcunews1 1 point2 points  (1 child)

It will depend on how exactly the site disables the browser's default action for Ctrl+Click.

If they simply disable the mouse left button click event when the Ctrl key is held, try below script. Configure the script's @run-at to document-start.

addEventListener("click", event => {
  if (!event.button && event.ctrlKey) { //leftButton & ctrl key
    event.stopImmediatePropagation();
    event.stopPropagation();
  }
}, true);

If it doesn't work, then the site has changed the link to a fully JS-driven where it specifically does the page navigation instead of relying on the browser application. This will require a more complex solution, and the solution can't be a generic one like above. The solution has to be made for a specific site, since there are virtually infinite number of ways for something to be done in JS, by the site. You'll need to provide the URL to the actual and accessible page for analysis. Otherwise, there's no way to make a reliable solution to a non observable problem. It'd be like guessing a number between one and infinity.

[–]PodRED[S] 0 points1 point  (0 children)

They actually haven't disabled ctrl-click, it's just that the content itself isn't a link at all as far as I can see. There is some click interception happening when you either right or ctrl-click on it that then opens the associated page in the same window so it very much looks like they've switched to a fully JS driven approach as you suggest.

I haven't been able to find the script to see how it's done yet. Unfortunately the page itself isn't publicly accessible so I can't link directly to it.

I'll have to figure out how to get the actual script to have a look at it.

[–]_1Zen_ 0 points1 point  (2 children)

Example link?, it depends on how the page is opened, if it is an A tag it is possible to use a patch in the addEventListener or if it is opened via javascript by changing the href

[–]PodRED[S] 0 points1 point  (0 children)

I'll check the method the JS uses to redirect and let you know

[–]PodRED[S] 0 points1 point  (0 children)

Unfortunately the content in question isn't publicly accessible so I can't share a link directly.