BigBisous

Unhide Referrer

Dec 13th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name          Unhide Referrer
  3. // @namespace     http://userscripts.org:8080/scripts/show/64990
  4. // @description   Removes the slow and annoying anonymizer redirecting delay pages (anonym.to etc.), and links to the real URLs.
  5. // @version       1.27
  6. // @include       *
  7. // @grant         none
  8. // ==/UserScript==
  9.  
  10. /*
  11.  
  12. Made by Chupacabra
  13. Last updated: 2014/06/19
  14.  
  15. CODER MOTIVATION
  16. ================
  17.  
  18. Like this script? Say thanks by leaving me a tip at PayPal (http://j.mp/yj2Kfg) or Pledgie (http://j.mp/xeCPDy)! It would encourage me to improve the script and program more free scripts and tools. Thank you!
  19.  
  20. REQUIREMENTS
  21. ============
  22.  
  23. For Mozilla Firefox users:
  24. --------------------------
  25.  
  26. You'll need (1) Mozilla Firefox (http://j.mp/xj8lwE) and (2) one of the following Firefox add-ons: Greasemonkey (http://j.mp/A7PgPE) or Scriptish (http://j.mp/JRd5B2). Make sure that Greasemonkey or Scriptish is enabled before you press the green "Install" button on this page. (Tested with Firefox 30.0, Greasemonkey 1.15 and Scriptish 0.1.7)
  27.  
  28. For Google Chrome users:
  29. ------------------------
  30.  
  31. You'll need Google Chrome (http://j.mp/xqDpMW) v4 or higher. Right click to the green "Install" button on this page, choose "Save link as...", save the file to a temporary directory, then select Chrome's wrench icon > Tools > Extensions, drag and drop the temporarily saved JavaScript file there (which you can delete after this from its temporary directory), and press Add. Don't panic if you see the "Extensions, apps, and themes can harm your computer." or "It can access: Your data on all websites" warnings, even if you're not a JavaScript programmer, you can see from the clean and compact source code that Unhide Referer is harmless. (Tested with Google Chrome 22.0.1229.79)
  32.  
  33. For Opera users:
  34. ----------------
  35.  
  36. You'll need Opera (http://j.mp/wGhPD3) and you have to enable User JavaScripts by selecting (if you need to, after creating) a directory for them in Menu > Settings > Preferences > Advanced > Content > JavaScript Options. Then right click to the green "Install" button on the script's page (http://j.mp/1ypwvc1), choose "Save Linked Content As...", and save it to your User JavaScript directory you have chosen before. (Tested with Opera 11.64)
  37.  
  38. For Mozilla SeaMonkey users:
  39. ----------------------------
  40.  
  41. You'll need (1) Mozilla SeaMonkey (http://j.mp/A6sRmW) and a SeaMonkey add-on called (2) Scriptish (http://j.mp/xFU57G) (a Greasemonkey fork, Greasemonkey isn't compatible with SeaMonkey anymore). Make sure that Scriptish is enabled before you press the green "Install" button on the script's page (http://j.mp/1ypwvc1). (Tested with 2.12.1 and Scriptish 0.1.7)
  42.  
  43. For Internet Explorer and Safari users:
  44. ---------------------------------------
  45.  
  46. Use Google (http://j.mp/yUBemM). There seem to be several options for Internet Explorer and Safari users (unfortunately there's no Windows solution for Safari yet). I don't have a Mac or a newer Windows version which is needed to run the latest stable Internet Explorer, still I plan to write more tutorials when I'll find time to experiment on these fronts.
  47.  
  48. For Flock, Epiphany and Songbird users:
  49. ---------------------------------------
  50.  
  51. According to Wikipedia (http://j.mp/wP3DgG), the script should work with Flock, Epiphany and Songbird. To be more precise, Wikipedia says Epiphany may have some problems with some scripts, but Unhide Referrer isn't a complex one. Anyway, I'm lazy to test it with these lesser known browsers, and Songbird is mainly a music player, rarely shows anonymized links, if ever. Since I don't test these, I don't officially support them. Maybe I will in the future.
  52.  
  53. FEATURES
  54. ========
  55.  
  56. This script is skipping the slow and annoying redirecting delay pages of the anonymizer services (anonym.to etc.) by removing these services from the URLs and linking to the real URLs instead. It has its pros and cons, you may have to sacrifice  some privacy for the much faster browsing experience, so use it with a little bit of caution.
  57.  
  58. Pros:
  59.  
  60. - Almost every anonymizer service has a delay page with ads. You can skip those to gain a lot of speed and some bandwidth.
  61. - Some older anonymizer services don't work anymore (you can guess running one isn't the biggest business in the world, so people behind some of these probably gave up their sites or domain names, or simply lost their interests), this script is fixing these problems too.
  62.  
  63. Cons:
  64.  
  65. - By default you will reveal the HTTP referrer (also known by the common misspelling referer (http://j.mp/zxPsa6)) to the landing page, against the will of the people behind the referring page. In most of the cases this isn't a serious security issue, sites can collect more serious informations about their visitors (IP addresses etc.), but there are ways to hide the referer with browser settings (http://j.mp/yDT4eA) or add-ons like RefControl (http://j.mp/w3ZMIo). I must add, these tricks can break some sites (which are verifying their inner links) and I had some problems with RefControl, so stopped using and recommending it.
  66.  
  67. CHANGELOG
  68. =========
  69.  
  70. v1.27 (2014-06-19)
  71. Since Userscripts.org isn't reachable throught the standard port for a while, updated the URLs with the (now working) 8080 port parameter.
  72.  
  73. v1.26 (2014-04-15)
  74. Removed bitGAMER and Underground Gamer, both sites are dead now. Added Anoney, HideRef.org and Layer7 Cache.
  75.  
  76. v1.25 (2012-09-12)
  77. Removed Demonoid since it went down and the old domain name was obsolete anyway. Updated bitGAMER with its new domain name. Added the required grant metadata. Updated the Google Chrome installation instructions.
  78.  
  79. v1.24 (2012-06-08)
  80. Added some new sites, requested by aireca.
  81.  
  82. v1.23 (2012-02-09)
  83. Refined the documentation and the service order. Documented the script itself to the case it will be mirrored elsewhere. Added the www or plain version of every service where one of these was missing.
  84.  
  85. v1.22 (2012-02-02)
  86. Added new sites and a simple profiler (disabled by default).
  87.  
  88. v1.21 (2010-05-28)
  89. Fixed a problem which prevented the script to work on some sites with escape problems. Added a few more sites requested by users (updated the test links below, will always list every supported site in the Testing Zone). Started to use 2 digit minor version numbers. Changed @namespace to the script's homepage. Changed the included pages from http://* to *.
  90.  
  91. v1.2 (2010-05-05)
  92. Added Demonoid's inner anonymizer to the list (was requested by 7of9).
  93.  
  94. v1.1 (2009-12-28)
  95. Speeded up with "switch / case". I can't benchmark it (I'm quite new in JavaScript and Greasemonkey), but as I know it's a lot faster than "if / else if" and supported by the newer browsers for a while. Really old ones may not support it.
  96.  
  97. v1.0 (2009-12-26)
  98. First release. I had problems with the abandoned anonym.to Link Remover (http://j.mp/1ypx31w) under Firefox 3.5.6 (its JavaScript engine doesn't understand "elseif"), fixed it for myself, then rewrote it, and expanded it with some similar services.
  99.  
  100. KNOWN ISSUES
  101. ============
  102.  
  103. It works only if the anonymizer is at the beginning of the link, so it won't remove it from the inside, if there are stacked forwarding services. But I guess nobody is using them that way out of testing purposes or by accident.
  104.  
  105. And it obviously works only on fully rendered sites. Some sites are generating the anonymized link on the fly, while forwarding from an inner link. Others are dynamically loading new contents with JavaScript, which could have anonymized links. This script can't change those, no Greasemonkey script could as far as I know.
  106.  
  107. SUPPORTED SERVICES AND FORMATS
  108. ==============================
  109.  
  110. anoney.com
  111. www.anoney.com
  112. anonym.to
  113. www.anonym.to
  114. antirefer.com
  115. www.antirefer.com
  116. dereferer.org
  117. www.dereferer.org
  118. www.deviantart.com
  119. hideref.info
  120. www.hideref.info
  121. hideref.l7cache.com
  122. www.hideref.l7cache.com
  123. hideref.org
  124. www.hideref.org
  125. hiderefer.com
  126. www.hiderefer.com
  127. hiderefer.org
  128. www.hiderefer.org
  129. www.esconde.me
  130. itaringa.net/go
  131. itaringa.net/out
  132. lik.cl
  133. www.lik.cl
  134. no-ref.com.ar
  135. www.no-ref.com.ar
  136. norefer.org
  137. www.norefer.org
  138. sjmp.eu
  139. www.sjmp.eu
  140. smartjump.eu
  141. www.smartjump.eu
  142. unrefer.com
  143. www.unrefer.com
  144. www.youtube.com
  145.  
  146. I will add more if more will be needed. Feel free to contact me (http://j.mp/1ypxgBQ) if your most hated service is missing from the list. :)
  147.  
  148. */
  149.  
  150. // var start = new Date().getMilliseconds(); // profiler part 1
  151.  
  152. for (var i = 0; i < document.links.length; i++) {
  153.   linkx = document.links[i];
  154.   switch(0) {
  155.     case linkx.href.indexOf("http://anoney.com/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 19)));break;
  156.     case linkx.href.indexOf("http://www.anoney.com/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 23)));break;
  157.     case linkx.href.indexOf("http://anonym.to/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 18)));break;
  158.     case linkx.href.indexOf("http://www.anonym.to/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 22)));break;
  159.     case linkx.href.indexOf("http://antirefer.com/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 22)));break;
  160.     case linkx.href.indexOf("http://www.antirefer.com/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 26)));break;
  161. //    case linkx.href.indexOf("http://bitgamer.su/redir.php?url=") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 33)));break;
  162. //    case linkx.href.indexOf("http://www.bitgamer.su/redir.php?url=") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 37)));break;
  163. //    case linkx.href.indexOf("http://demonoid.com/redirect.php?url=") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 37)));break;
  164. //    case linkx.href.indexOf("http://www.demonoid.com/redirect.php?url=") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 41)));break;
  165.     case linkx.href.indexOf("http://dereferer.org/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 22)));break;
  166.     case linkx.href.indexOf("http://www.dereferer.org/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 26)));break;
  167.     case linkx.href.indexOf("http://www.deviantart.com/users/outgoing?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 41)));break;
  168.     case linkx.href.indexOf("http://www.esconde.me/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 23)));break;
  169.     case linkx.href.indexOf("http://hideref.info/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 21)));break;
  170.     case linkx.href.indexOf("http://www.hideref.info/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 25)));break;
  171.     case linkx.href.indexOf("http://hideref.l7cache.com/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 28)));break;
  172.     case linkx.href.indexOf("http://www.hideref.l7cache.com/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 32)));break;
  173.     case linkx.href.indexOf("http://hideref.org/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 20)));break;
  174.     case linkx.href.indexOf("http://www.hideref.org/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 24)));break;
  175.     case linkx.href.indexOf("http://hiderefer.com/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 22)));break;
  176.     case linkx.href.indexOf("http://www.hiderefer.com/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 26)));break;
  177.     case linkx.href.indexOf("http://hiderefer.org/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 22)));break;
  178.     case linkx.href.indexOf("http://www.hiderefer.org/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 26)));break;
  179.     case linkx.href.indexOf("http://links.itaringa.net/go?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 29)));break;
  180.     case linkx.href.indexOf("http://links.itaringa.net/out?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 30)));break;
  181.     case linkx.href.indexOf("http://lik.cl/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 15)));break;
  182.     case linkx.href.indexOf("http://www.lik.cl/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 19)));break;
  183.     case linkx.href.indexOf("http://no-ref.com.ar/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 22)));break;
  184.     case linkx.href.indexOf("http://www.no-ref.com.ar/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 26)));break;
  185.     case linkx.href.indexOf("http://norefer.org/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 20)));break;
  186.     case linkx.href.indexOf("http://www.norefer.org/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 24)));break;
  187.     case linkx.href.indexOf("http://sjmp.eu/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 16)));break;
  188.     case linkx.href.indexOf("http://www.sjmp.eu/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 20)));break;
  189.     case linkx.href.indexOf("http://smartjump.eu/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 21)));break;
  190.     case linkx.href.indexOf("http://www.smartjump.eu/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 25)));break;
  191. //    case linkx.href.indexOf("http://underground-gamer.com/redir.php?url=") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 43)));break;
  192. //    case linkx.href.indexOf("http://www.underground-gamer.com/redir.php?url=") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 47)));break;
  193.     case linkx.href.indexOf("http://unrefer.com/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 20)));break;
  194.     case linkx.href.indexOf("http://www.unrefer.com/?") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 24)));break;
  195.     case linkx.href.indexOf("http://www.youtube.com/redirect?q=") : linkx.href = decodeURIComponent(unescape(linkx.href.substring(linkx.href.indexOf("") + 34)));break;
  196.   }
  197. }
  198.  
  199. // var end = new Date().getMilliseconds(); // profiler part 2
  200. // var time = end - start;
  201. // if (time != 0)
  202. //   GM_log('Execution time: ' + time);
Add Comment
Please, Sign In to add comment