-3

My site has disallowed copy and paste using some CSS and JS tricks. I know it is hackable but it still effectivly increases the cost of stealing content from my site. But some browsers like Chrome and Edge are trying to Reader Mode which make copying content from my site much easier now. Is there any way I can disable it? Thanks a lot.

user2335065
  • 2,337
  • 3
  • 31
  • 54

1 Answers1

0

ReferLink

document.addEventListener('copy', function(e) {
e.clipboardData.setData('text/plain', 'Please do not copy text');
e.clipboardData.setData('text/html', '<b>Please do not copy text</b>');
e.preventDefault();
});
Federico Navarrete
  • 3,069
  • 5
  • 41
  • 76
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 03 '21 at 08:12