Skip to content

Instantly share code, notes, and snippets.

@gojun077
Created September 11, 2012 08:51
Show Gist options
  • Save gojun077/3697010 to your computer and use it in GitHub Desktop.
Save gojun077/3697010 to your computer and use it in GitHub Desktop.
Example of anticopy JS from Daum Korea blogs
document.oncontextmenu = new Function ('return false'); //block right-click
document.ondragstart = new Function ('return false'); //block drag and drop
document.onselectstart = new Function ('return false'); //block text select
document.body.style.MozUserSelect = 'none'; //block text select on miscellaneous browsers
//Below is a js library containing various anti-copy schemes
http://s1.daumcdn.net/cfs.tistory/v/0/blog/plugins/PreventCopyContents/js/functions.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment