Offsite Link Fixer

Replaces offsite links redirect page with the actual page

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Advertisement:

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Advertisement:

// ==UserScript==
// @name            Offsite Link Fixer
// @description     Replaces offsite links redirect page with the actual page
// @version         1.26
// @grant           none
// @icon            data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABapJREFUeNq8V31MU1cU76OvrVChBeVTKKVFUdgUJqIwdQNlTBzDuKhT5nS41On8moEJwyhOB5uYsRA/tpkQA7pg8A9BxYFiwMUtCEYZtFVHodBKlY/S9tGWfr23e5vXrVbF19nsJCfpO/f2nN/93XvOPRchCIL2KoIgCOW5z4vl5Wa8gP/wn0nFHWcBd0Zbiy24+aBEImEi7izdEwBMJhO3D5NwSru2LeLz+cuBie4KAlA8xV0AKPPDbylNVFbk6sN8osbLxLvTVoZ//ADIcExMzD0wZHEEf6TGDur1+go2m63yOAOnTp0aiw9YrMYJHDl0Lzc7Kpr/Xk1NDc/hAzAUef53Ce+aWAlBJMDzSapnABQXF9sQC30ogBU0+sjQy9vVlpk5b968pIKCAg4MZDQa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eeXGuoC+oqKvJhISElQaxCcSFBf8RO47dfl5ezVisfgxmHafpP2Z4HYA4JrVUt37YCC93RKePa2mL+vg3oi/c/i7wza4wpSUFJ3WxrDlLI5teSxuu19VVfUE2AcnC+5ggJKYawroBut4qNo0NG2Gj2CgYmFDw/ytiTRAMWRQymKx9HMFYcPbViZLQ4ODIOUw1x+TB85MvOgFBO1UFMOwoFtPrp5IusywdIy0VICWax/4+ydAF0Fy4M1bVlYWxeFw4BbFAo0Eau8LJ/OLUH2aga5XcElVeVCi7QiJFi+7kpOTM0RSLCNz2kr2gCzyTJlhqgH/lkmLF9UtUCgUWJR/rDabt0UekhZ635Vix06RQOwNFMxzSg9GKgr7uvLycv5kFDu9BRCy3XupX8pbANIL0jrFXYpf3r5QB4CQ3a2XC8WUO6rnxfpbgAEAyYH9o8Y8/lwAAAAASUVORK5CYII=
// @match           http://existenz.se/out.php*
// @match           http://*.existenz.se/out.php*
// @match           https://flashback.org/leave.php*
// @match           https://*.flashback.org/leave.php*
// @match           http://leenks.com/link*.html
// @match           http://*.leenks.com/link*.html
// @match           http://tunngle.net/redirect/redirect.php*
// @match           http://*.tunngle.net/redirect/redirect.php*
// @match           http://kat.cr/confirm*
// @match           https://kat.cr/confirm*
// @namespace https://greasyfork.org/users/13667
// ==/UserScript==

var domain = window.location.host.match(/(?:www\.)?(.*)/i);

if (domain) {
  switch (domain[1]) {
    case 'existenz.se':
      doIt(document.getElementsByTagName("iframe")[0].src);
      break;
    case 'flashback.org':
      doIt(document.querySelector("a.link").href);
      break;
    case 'leenks.com':
      doIt(document.getElementsByTagName("frame")[1].src);
      break;
    case 'tunngle.net':
      doIt(document.links[3].href);
      break;
    case 'kat.cr':
      doIt(document.querySelector("a[rel=nofollow]").href);
      break;
  }
}

function doIt(url) {
	var strLocation = window.top.location || window.location;
    strLocation.replace(url);
}