How to Disable Copy function Except Blockquote in Blogger | Share To World

Tuesday, November 11, 2014

How to Disable Copy function Except Blockquote in Blogger

  admin       Tuesday, November 11, 2014
The first content of this blog is about How to Disable Copy and Paste Function in Blogger that help your articles in website avoid from copying and paste in the new website. Sometimes the content copied by newbies gets higher rankings in search engines than your original content and this is unfair which lowers the motivation of genuine bloggers. So it is important to protect your blog content from these content thieves and this is the agenda of this post.

This is the magic code we are using on this blog because we are sharing tutorials where readers need to copy some codes we share like CSS/JavaScript/HTML etc. So on the same time we do not let readers copy our posts' text are other than codes/Text we want to share. This is possible with this simple CSS code where we enable the copy and paste of text/code we post in "blockquotes" only.

1- Go to Blogger Dashboard
2- Template  >>  Edit HTML (I recommend you to Back up your template first to avoid error).
3- In the HTML code box, press Ctrl+F then type the code below

4- Now copy and paste the code below just before/above ]]></b:skin>
/*----- Disable Text Selection with CSS Code--- TB----*/
.post blockquote{-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
body {
-webkit-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
user-select: none;

Note: In the above CSS code we have enabled the copy/selection of text/code we post using blockquotes by enabling .post blockquote but it may not work for you if your template is using different CSS class for blockquote for e.g. our template using .post blockquote where your template may be using .post-body blockquote or .blockquote. So in that case you need to replace .post blockquote with .post-body blockquote or .blockquote in above CSS code.

That's it! Don't forget to share to your friends!


Thanks for reading How to Disable Copy function Except Blockquote in Blogger

« Prev Post

No comments:

Post a Comment