The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
5 posters

    how to add script anti piracy

    indoromance
    indoromance
    Forumember


    Male Posts : 84
    Reputation : 1
    Language : Indonesian
    Location : Indonesia

    Solved how to add script anti piracy

    Post by indoromance February 26th 2012, 10:13 am

    i found this anti-piracy (anti copypaste) code from google. where should i add this code?

    Code:
        <script type=’text/javascript’>

        function addLink() {

        var body_element = document.getElementsByTagName(‘body’)[0];

        var selection;

        selection = window.getSelection();

        var pagelink = “<br/><br/> Read more at: <a href=’”+document.location.href+”‘>”+document.location.href+”</a><br/>Tretan.net: Terima kasih Anda tidak menghapus link sumbernya.“; // change this if you want

        var copytext = selection + pagelink;

        var newdiv = document.createElement(‘div’);

        newdiv.style.position=’absolute’;

        newdiv.style.left=’-99999px’;

        body_element.appendChild(newdiv);

        newdiv.innerHTML = copytext;

        selection.selectAllChildren(newdiv);

        window.setTimeout(function() {

        body_element.removeChild(newdiv);

        },0);

        }document.oncopy = addLink;

        </script>


    Last edited by indoromance on February 27th 2012, 9:11 am; edited 1 time in total
    midoweb96
    midoweb96
    Forumember


    Posts : 166
    Reputation : 12
    Language : Css - Html - Jquery

    Solved Re: how to add script anti piracy

    Post by midoweb96 February 26th 2012, 11:22 am

    hi
    on your Forum widgets management , or homepage.
    indoromance
    indoromance
    Forumember


    Male Posts : 84
    Reputation : 1
    Language : Indonesian
    Location : Indonesia

    Solved Re: how to add script anti piracy

    Post by indoromance February 26th 2012, 12:10 pm

    unable bro........
    Suarez
    Suarez
    Forumember


    Male Posts : 149
    Reputation : 9
    Language : Romanian | English | German | HTML | CSS | jQuery
    Location : Las Vegas, Nevada

    Solved Re: how to add script anti piracy

    Post by Suarez February 26th 2012, 12:48 pm

    Try do add in announcement.
    LGforum
    LGforum
    Hyperactive


    Male Posts : 2265
    Reputation : 264
    Language : English
    Location : UK

    Solved Re: how to add script anti piracy

    Post by LGforum February 26th 2012, 2:45 pm

    Do you realise what te code does?
    It doesn't prevent people from copying things. It simply adds a link to your site on the bottom of the copied material.
    Not to mention the oncopy event is set on the body tag which I'm not sure will work unless they copy the whole page, the oncopy event occurs on the deepest element where the selection starts.
    indoromance
    indoromance
    Forumember


    Male Posts : 84
    Reputation : 1
    Language : Indonesian
    Location : Indonesia

    Solved Re: how to add script anti piracy

    Post by indoromance February 27th 2012, 9:09 am

    solved bro.... i change with this script

    Code:
    <script type="text/javascript">
    if(document.location.protocol=='http:'){
     var Tynt=Tynt||[];Tynt.push('aGdodsE8Cr4iybadbi-bpO');Tynt.i={"ap":"Sumber:","as":"COPYRIGHT© 2010-2012. INDOROMANCE MEDIA PRESS. ALL RIGHT RESERVED.","st":true};
     (function(){var s=document.createElement('script');s.async="async";s.type="text/javascript";s.src='http://tcr.tynt.com/ti.js';var h=document.getElementsByTagName('script')[0];h.parentNode.insertBefore(s,h);})();
    }
    </script>
    Nera.
    Nera.
    Energetic


    Female Posts : 7078
    Reputation : 2017
    Language : English
    Location : -

    Solved Re: how to add script anti piracy

    Post by Nera. February 27th 2012, 9:19 am

    Topic Solved & Locked

      Current date/time is November 11th 2024, 8:21 pm