Skip to content

Instantly share code, notes, and snippets.

@mushfiqur-rahman
Created June 23, 2024 15:31
Show Gist options
  • Save mushfiqur-rahman/b1ed7ebcac2c9084f33aadcfc6dc2360 to your computer and use it in GitHub Desktop.
Save mushfiqur-rahman/b1ed7ebcac2c9084f33aadcfc6dc2360 to your computer and use it in GitHub Desktop.
Restrict/Disable Copy & Paste on Blogger Blog — Protect Your Content From Copying
/**
Firstly, log in to Blogger Dashboard.
Now go to the Layout Section on the left side menu.
After that click on Add a Gadget on the right side.
Now paste the below code in it without naming the gadget with the title.
Now click save.
**/
<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 false");
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment