Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
702 views
in Q2A Core by
I want to add this code to prevent full copy from my website
where i can add this code?
or do something like it?
**********************
document.addEventListener('copy', (event) => {

  let appendLNK = `\n\nللمزيد: ${document.location.href}`;

  event.clipboardData.setData('text', document.getSelection() + appendLNK );

  event.preventDefault();

});
*******************

1 Answer

+1 vote
by
You do not do that.

Whatever you do to prevent visitor to copy content from the page shown to him it would not work. It may just make it harder to copy, but not to prevent it.
by
right anyone can copy it from source or if you want to hide from source , it is possible
by
Yes
I don't need to prevent copy completely

I just waon to copy anything but in the last write
For more information visit mysite.com
by
I think you are saying about this website
Sarthaks.com but mostly people copy it from source code
...