Status
Not open for further replies.

Magizet

Active Member
34
2013
0
0
Hello, using WordPress. What is good or the best way to hide links? Only external of course (to filehosting sites). Using Anonym.to but it hides only HTTP links, not HTTPS.
I found killrefer.com, which is nice but I don't know how to implent it to my blog.

Thank you.
 
12 comments
just use a script like this on your page:
Code:
<script>
window.onload = function() {
       var anchors = document.getElementsByTagName("a");


	for (var i = 0; i < anchors.length; i++) {
		if (anchors[i].href.indexOf("youdomain") != -1 
		|| anchors[i].href.indexOf("another.domain.wihtout.anyonym") != -1
		|| anchors[i].href.indexOf("javascript") == 0
		){}
		else {		
		    anchors[i].href = "http://anonym.to/?" + anchors[i].href
		}
	}
}
</script>
this will anonymize your links on load of the page.
you've got there 3 examples for exceptions
1. your own page
2. another domain
3. links starting with javascript

though, this won't work on sites with dynmaic loading content
 
hi,
instead of writing
if (anchors.href.indexOf("www.mydomain.com") != -1

write only

if (anchors.href.indexOf("mydomain.com") != -1

the indexOf searches for the occurence of "mydomain.com"
so subdomain.mydomain.com will also be found
-1 is the default value if it wasn't found in a link.

alternatively just add the following line:
|| anchors.href.indexOf("subdomain.mydomain.com") != -1

you shouldn't probably add domains with /xyz unless your own domain should be anonymized on all other links.
 
well.
here it's all okay. and an anonym.to is in front of the https-url. - as expected
mdbvrb2c.png
 
ah.
that's not a problem of my script, but from itunes itself.
requests coming from anonym.to will be redirected to localhost.

an alternative could be
http://hideref.org/
or dereferer.info
or dereferer.pw

just google for dereferer services :)
 
Last edited:
Status
Not open for further replies.
Back
Top