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.

how to add script anti piracy

5 posters

Go down

Solved how to add script anti piracy

Post by indoromance Sun 26 Feb - 11:13

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 Mon 27 Feb - 10:11; edited 1 time in total
indoromance
indoromance
Forumember

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

http://www.indoromance.friendhood.net

Back to top Go down

Solved Re: how to add script anti piracy

Post by midoweb96 Sun 26 Feb - 12:22

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

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

Back to top Go down

Solved Re: how to add script anti piracy

Post by indoromance Sun 26 Feb - 13:10

unable bro........
indoromance
indoromance
Forumember

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

http://www.indoromance.friendhood.net

Back to top Go down

Solved Re: how to add script anti piracy

Post by Suarez Sun 26 Feb - 13:48

Try do add in announcement.
Suarez
Suarez
Forumember

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

http://http:/frog-design.net

Back to top Go down

Solved Re: how to add script anti piracy

Post by LGforum Sun 26 Feb - 15:45

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.
LGforum
LGforum
Hyperactive

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

Back to top Go down

Solved Re: how to add script anti piracy

Post by indoromance Mon 27 Feb - 10:09

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>
indoromance
indoromance
Forumember

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

http://www.indoromance.friendhood.net

Back to top Go down

Solved Re: how to add script anti piracy

Post by Nera. Mon 27 Feb - 10:19

Topic Solved & Locked
Nera.
Nera.
Energetic

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

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum