// ==UserScript==
// @name Remove "target=_blank"
// @author Arve Bersvendsen 
// @namespace http://virtuelvis.com/
// @description  This script will search for all links on a page, and
//			remove all instances of target="_blank" in the
//			page, so that web sites never, ever opens new
//			windows.
// @ujs:category general: enhancements
// @ujs:published 2005-05-11 15:08
// @ujs:modified 2005-09-19 09:19
// @ujs:documentation http://userjs.org/scripts/general/enhancements/remove-blank 
// @ujs:download http://userjs.org/scripts/download/general/enhancements/removeblank.js 
// @ujs:download.gm http://userjs.org/scripts/download/general/enhancements/removeblank.user.js 
// @include *
// @exclude http://*.googlesyndication.com/*
// ==/UserScript==


/* 
 * This script is granted to the Public Domain
 */

document.addEventListener('load',function(ev){
  var d = document.getElementsByTagName('a');
  for (var i = d.length-1; i > -1; i--) {
    if (d[i].getAttribute('target') == "_blank") {
      d[i].removeAttribute('target');
    }
  }
},false);
