Skip to content

Instantly share code, notes, and snippets.

@umitanuki
Created May 20, 2010 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umitanuki/407520 to your computer and use it in GitHub Desktop.
Save umitanuki/407520 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Hacker News => target="_blank"
// @namespace umitanuki
// @include http://news.ycombinator.com/
// ==/UserScript==
(function(){
var ary = document.getElementsByClassName("title");
for(var i=0, l=ary.length; i<l; i++){
var as = ary[i].getElementsByTagName("a");
for(var j=0, m=as.length; j<m; j++){
as[j].target = "_blank";
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment