Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

anonym.to Link Remover

Removes anonym.to redirects and links to the real URL

Removes "anonym.to" redirect links in pages and redirects links to the real URL. My first script :)




Jan 2, 2008
Bodie Chandler User

For those with similar issues these 2 changes are the only ones I made:

instead of
if (linkx.href.indexOf("http://anonym.to/?") != -1)

change to:

if (linkx.href.indexOf("http://www.anonym.to/?") != -1)

and:

decodeURIComponent(linkx.href.substring(linkx.href.indexOf("") + 18));

to

decodeURIComponent(linkx.href.substring(linkx.href.indexOf("") + 22));

Thx for a great script!

 
Jan 2, 2008
Bodie Chandler User

Hi there! Nowadays it's common they use "www."anonym.to redirects aswell. So I modified the script accordingly to fit that scenario aswell:

// ==UserScript==
// @name anonym.to Link Remover
// @description Removes anonym.to redirects and links to the real URL
// @include http://*
// ==/UserScript==

// Find "http://anonym.to/?" and chop the 18 digits off
for (var i = 0; i < document.links.length; i++) {
linkx = document.links[i];
if (linkx.href.indexOf("http://www.anonym.to/?") != -1) {
linkx.href = decodeURIComponent(linkx.href.substring(linkx.href.indexOf("") + 22));
}
}

You could comment on this script if you were logged in.