1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Client-side link cloaking script (newbies)

Discussion in 'Cloaking and Content Generators' started by b4br 514h, Jan 2, 2012.

  1. b4br 514h

    b4br 514h Newbie

    Joined:
    Dec 19, 2011
    Messages:
    34
    Likes Received:
    10
    Occupation:
    Occupied makin money
    Location:
    Planet Earth
    Here is a little test script I just wrote and should work to cloak links client-side, i wanted to share with you guys, specially newbies :)

    This shows a normal link (internal link) to the user when hovering, but when he clicks it takes them to other link (internal or external, aff. link for example)

    Note: I haven't tested it very much, but should work in all major browsers ;)
    Note also: you should also cloak server-side since google Will see this and f*** you

    Code:
    <html>
    <head><title>Cloak test</title>
    
    <script type="text/javascript">
    
    var CLOAKED_LINK = "your-evil-script.html"; //change this value to your link
    
    function cloakIt(event) {
       event.returnValue = false;
       if(event.preventDefault) event.preventDefault();
       window.location.href = CLOAKED_LINK;
       return false;
    }
    </script>
    
    </head>
    <body>
    
    <a href="./friendly.html" onclick="cloakIt(event)" >Soccer</a>
    
    </body>
    </html>
     
    • Thanks Thanks x 1