5 ms·
Ask HN: Why do links open in the same tab on Hacker News?
Why do links open in the same tab on HN? I would love to be able to just click five interesting links and have five new tabs open.
- augustt 10y agoThat's the default on pretty much every site (google, reddit, etc). Instead, you can cmd/ctrl click the link.
- esalazar 10y agoI understand it's the default, but why? Why not add `target="_blank"` or some javascript to open in a new tab?
- detaro 10y agoBecause then you can't open it in the same tab. With a normal link the user can choose how to click, with a forced new tab they can't.
- esalazar 10y agoFair enough.
- sotojuan 10y agoAside from what detaro said, also this: https://medium.com/@jitbit/target-blank-the-most-underestimated-vulnerability-ever-96e328301f4c https://medium.com/@jitbit/target-blank-the-most-underestima...
- cwt 10y agoUse Chrome, install the Vimium plugin: F + {Letter Combo}
- JeffreyKaine 10y agoI asked this a while back as well. I'm with you, but the community seems rather split on the subject.
- auganov 10y agoI just Ctrl-click when I want it in a new tab. Always expect a single click to open in the current tab, otherwise it's an annoying surprise.
- _RPM 10y agoIt's possible that it's a security thing. I consider it a feature. `window.opener` can do things that might be considered malicious.
- crispytx 10y agoBecause Hacker News sucks...
- dmlittle 10y agoyet you still take the time to browse and comment...
- brudgers 10y agoA user script using Greasemonkey for Firefox or TamperMonkey for Chrome/Chromium can change the behavior. For example: // ==UserScript== // @name add_target_blank // @namespace com.kludgecode.demonstration // @include https://news.ycombinator.com/news // @version 1 // @grant none // ==/UserScript== var stories=document.getElementsByClassName("storylink"); for (story of stories) { story.target = "blank"; }; Will add the behavior for the Hacker News front page. I tested with Greasemonkey and I'd expect it to work for Tampermonkey. Greasemonkey: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/ Tampermonkey: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en https://chrome.google.com/webstore/detail/tampermonkey/dhdgf...
- NetStrikeForce 10y agoctrl (or command) click does the trick, but for me it's easier to just middle-click with the mouse (or click the wheel).
- siquick 10y agoI use this Chrome plugin to open links to any external site in a new tab https://chrome.google.com/webstore/detail/open-external-links-in-ne/pmgjfdndcgbblimbigekghdmgkjbffba https://chrome.google.com/webstore/detail/open-external-link...