Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ibrahimkholil/0dcdb106bf3f46f2af2b25fa084b5998 to your computer and use it in GitHub Desktop.
Save ibrahimkholil/0dcdb106bf3f46f2af2b25fa084b5998 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
$(document).ready(function () {
//Disable cut copy paste
$('body').bind('cut copy paste', function (e) {
e.preventDefault();
});
//Disable mouse right click
$("body").on("contextmenu",function(e){
return false;
});
});
</script>
Disable Cut Copy & Paste:
<script type="text/javascript">
$(document).ready(function () {
//Disable full page
$('body').bind('cut copy paste', function (e) {
e.preventDefault();
});
//Disable part of page
$('#id').bind('cut copy paste', function (e) {
e.preventDefault();
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment