Redirect away

Remove redirects across the web speeding up performance

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 or Violentmonkey 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.

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

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

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

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

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

// ==UserScript==
// @name         Redirect away
// @include      http*
// @locale      en
// @version      0.20
// @description  Remove redirects across the web speeding up performance
// @author       Danny J Kendall (MANICX100)
// @grant        none
// @namespace https://greasyfork.org/users/169145

// ==/UserScript==

(function() {

    var k, x, t, i, j, p;
    for (k = 0; x = document.links[k]; k++) {
        t = x.href.replace(/[%]3A/ig, ':').replace(/[%]2f/ig, '/');
        i = t.lastIndexOf('http');
        if (i > 0) {
            t = t.substring(i);
            j = t.indexOf('&');
            if (j > 0) t = t.substring(0, j);
            p = /https?\:\/\/[^\s]*[^.,;'">\s\)\]]/.exec(unescape(t));
            if (p) x.href = p[0];
        } else if (x.onmouseover && x.onmouseout) {
            x.onmouseover();
            if (window.status && window.status.indexOf('://') != -1) x.href = window.status;
            x.onmouseout();
        }
        x.onmouseover = null;
        x.onmouseout = null;
    }

})();