[ALL] Links Open ALL in CURRENT Tab

Open ALL links in CURRENT tab.

  1. // ==UserScript==
  2. // @name [ALL] Links Open ALL in CURRENT Tab
  3. // @author
  4. // @description Open ALL links in CURRENT tab.
  5. // @downloadURL
  6. // @grant
  7. // @homepageURL https://bitbucket.org/INSMODSCUM/userscripts-scripts/src
  8. // @icon
  9. // @include http*://*
  10. // @namespace insmodscum
  11. // @require
  12. // @run-at document-start
  13. // @updateURL
  14. // @version 1.0
  15. // ==/UserScript==
  16.  
  17. // rtfm: http://www.w3schools.com/tags/att_a_target.asp
  18.  
  19. var a = document.getElementsByTagName("a");
  20. for( i=0; i < a.length; i++ )
  21. a[i].target = "_self";