Skip to content

Instantly share code, notes, and snippets.

@pbaruns
Last active April 27, 2020 10:44
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 pbaruns/a24ad79b027956ed5d77fd3e6c201467 to your computer and use it in GitHub Desktop.
Save pbaruns/a24ad79b027956ed5d77fd3e6c201467 to your computer and use it in GitHub Desktop.
Blogger - protect blog posts and pages by disabling text selection and copying.
//disable Text Selection and Copying
<script src='demo-to-prevent-copy-paste-on-blogger_files/googleapis.js'>
</script>
<script type='text/javascript'>
if (typeof document.onselectstart!="undefined" ) {
document.onselectstart=new Function ("return false" );
}
else {
document.onmousedown=new Function ("return false" );
document.onmouseup=new Function ("return true" );
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment