LinksOnHN[n].setAttribute('target',"_blank");
As of dec 21 ,2008 - clicking on stories in HN,open them in the same tab. An average visit to HN involves for me, 10 (right clicks + click ) combo's (on my laptop )
would it help to add a target="_blank" attributes for story links, so that they open in new tabs/windows ( edit: and the tab with HN links remains intact )
this also works out well for those who prefer using the keyboard to navigate links in a page. ( yup, vi/emacs does that to ppl ! )
~B
tags: [accessibility]
(
41 comments
| 9 points
| on HN
)
http://userscripts.org/scripts/show/30512
This is only seconded by links that are something like: <a href="javascript:void(0);" onclick="someStuff();">
I sure do love opening a tab for javascript:void(0).
I mean this isnt 5 years ago and sites are opening obtrusive windows that fill up the taskbar and ruin your history
There are a million tools for users to control their browsing experience ... in the browser. Do not force it in your application.
Agreed. Is there a plugin in Firefox that ignores target directives and does it the way I want?
https://addons.mozilla.org/en-US/firefox/addon/1122
It has a whole bunch of features, one of which is to force all links to open in the current tab.
I am a keyboard junkie and I have no problem with Hacker News. I just use the amazing Vimperator extension which adds vim keybindings to Firefox. So to open a link in a new tab I just press "F" to activate quickhints, which displays a number beside each link, then I type the number of the link I want. (Or I can type some text that is contained in the <a> tag). http://vimperator.org
Ultimately this is a browser UI issue, not a Hacker News issue.
Also, in firefox, ctrl+enter opens a highlighted link in a new tab while keeping the current tab open. ctrl+shift+enter to open and focus the new tab.
ctrl+shift+press link does the same, but is pretty much as inconvenient than right click -> open in new tab
i agree middle button works out best, but that said - a lot of laptop users also dont carry a spare mouse, and "trying to click left and right" on the laptop sort of breaks the flow.
other advantages? ... keeps the index of HN links on one tab the whole day,links opens in new tabs.
it's also a question of "can i eliminate the need of a mouse"
2. http://userscripts.org/scripts/show/36606 There are other Greasemonkey scripts like this.
3. https://addons.mozilla.org/en-US/firefox/addon/379 There are other extensions like this.
4. Write your own ff extension or gm script.
5. Just use backspace or Alt-LeftArrow.
It would be cool if there were an "HN Labs" that suggested feature submissions and allowed users to add them to their accounts as profile extensions.
Setting up HN links with _blank is also a trivial solution to implement on your own though.