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.
// ==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/
Tampermonkey: https://chrome.google.com/webstore/detail/tampermonkey/dhdgf...
https://medium.com/@jitbit/target-blank-the-most-underestima...
https://chrome.google.com/webstore/detail/open-external-link...