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!

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name        Remove HTML Hidden Links
// @namespace   http://98y89hurdfg
// @include     https://*
// @include     http://*
// @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!
// @version     1.1.1
// @grant       none
// ==/UserScript==


var a = document.getElementsByTagName("a");
for (var x=1; x<=a.length; x++) {
  try {
  if (a[x].getAttribute("data-outbound-url")) {
    a[x].removeAttribute("data-outbound-url");
  }} catch(e){}
  try {
  if (a[x].getAttribute("data-href-url")) {
    a[x].removeAttribute("data-href-url");
  }} catch(e){}
  try {
  if (a[x].getAttribute("data-outbound-expiration")) {
    a[x].removeAttribute("data-outbound-expiration");
  }} catch(e){}
  try {
  if (a[x].getAttribute("data-event-action")) {
    a[x].removeAttribute("data-event-action");
  }} catch(e){}
  try {
  if (a[x].getAttribute("rel")) {
    a[x].removeAttribute("rel");
  }} catch(e){}
  try {
  if (a[x].getAttribute("data-inbound-url")) {
    a[x].removeAttribute("data-inbound-url");
  }} catch(e){}
}