Remove HTML Hidden Links

Remove hidden links on modern HTML anchor elements. a.href should ALWAYS be the real link. DOWN WITH W3 CONSORTIUM! DOWN WITH THE INTERNET TAKEOVER! DEATH TO THE CONSPIRATORS!

  1. // ==UserScript==
  2. // @name Remove HTML Hidden Links
  3. // @namespace http://98y89hurdfg
  4. // @include https://*
  5. // @include http://*
  6. // @description Remove hidden links on modern HTML anchor elements. a.href should ALWAYS be the real link. DOWN WITH W3 CONSORTIUM! DOWN WITH THE INTERNET TAKEOVER! DEATH TO THE CONSPIRATORS!
  7. // @version 1.1.1
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11.  
  12. var a = document.getElementsByTagName("a");
  13. for (var x=1; x<=a.length; x++) {
  14. try {
  15. if (a[x].getAttribute("data-outbound-url")) {
  16. a[x].removeAttribute("data-outbound-url");
  17. }} catch(e){}
  18. try {
  19. if (a[x].getAttribute("data-href-url")) {
  20. a[x].removeAttribute("data-href-url");
  21. }} catch(e){}
  22. try {
  23. if (a[x].getAttribute("data-outbound-expiration")) {
  24. a[x].removeAttribute("data-outbound-expiration");
  25. }} catch(e){}
  26. try {
  27. if (a[x].getAttribute("data-event-action")) {
  28. a[x].removeAttribute("data-event-action");
  29. }} catch(e){}
  30. try {
  31. if (a[x].getAttribute("rel")) {
  32. a[x].removeAttribute("rel");
  33. }} catch(e){}
  34. try {
  35. if (a[x].getAttribute("data-inbound-url")) {
  36. a[x].removeAttribute("data-inbound-url");
  37. }} catch(e){}
  38. }
  39.