Last active
April 27, 2020 10:44
-
-
Save pbaruns/a24ad79b027956ed5d77fd3e6c201467 to your computer and use it in GitHub Desktop.
Blogger - protect blog posts and pages by disabling text selection and copying.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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