Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Some websites use "creative" (javascript?) hyperlinks which break browser functionality, such as the ability to ctrl+click or middle click links to open them in a new tab.

A common example, taleo HR websites http://www.rogers.com/web/Careers.portal?_nfpb=true&_pageLabel=C_CP&_page=9

No matter what I try, I can only follow links by clicking on them normally; I can't open them in a new window. Is there any way around this?

share|improve this question
    
Yes, href is set to # and JS is invoked on onclick event of links (site doesn't work with JS disabled). Perhaps there's some sort of browser plugin that can deal with this. –  Karan Jun 7 '13 at 1:36
1  
There is a request for a solution in Mozilla's Bugzilla: Bug 55696 - "Force JavaScript link to open in new window or new tab". –  pabouk Aug 5 '13 at 13:52
    
Yeah I always thought this is extremely silly –  Gigala Jul 28 at 10:20

1 Answer 1

Yes. You can write your own scripts for Greasemonkey (Firefox) or Tampermonkey (Chrome)

For the example you mentioned, this Tampermonkey UserScript will set all JavaScript links in the search results to open in new tab / window (this depends on browser configuration, it's tabs for me).

// ==UserScript==
// @name       open links in tabs
// @match      http://rogers.taleo.net/careersection/technology/jobsearch.ftl*
// ==/UserScript==

document.getElementById('ftlform').target="_blank"

Though you can write more generic versions of this, enabling this functionality for all JavaScript links without breaking other usability will be hard.

A middlepath could be to set an event handler for Ctrl, that will temporarily set the target for ALL forms to "_blank" as long as the key is held.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.