Disable Copy Function On Blogger With CSS or JavaScript

SHARE:


Most of the genuine bloggers on BlogSpot platform face the problem of their blogs' content being copied or duplicated by newbies who are just entering in the blogosphere with the goal of making money without making real efforts and understanding the value of original/unique content. Sometimes the content copied by them 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. We will disable the copy function by disabling the mouse right click and CTRL+A. We have two options for doing this i.e., via a JavaScript Code if you want to disable whole text area of blog or via CSS code if you share some codes/text on your blog posts and your readers need to copy them.
Image result for Disable Copy Function On Blogger With CSS or JavaScript

Disable Text Selection On Blogger With JavaScript Code


Go to Blogger→Template→Edit Template→Backup Your Template Code First.
Now search for <head> and copy paste the JavaScript Code given below after <head> tag.
(Note: - use Ctrl+F in Windows and Cmd+F in Mac to search for code in template)

<!--Disabe Copy Paste--- TB-->
<script language='JavaScript1.2'>
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function (&quot;return false&quot;)
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>

Now save your template and view your blog to check the results.


Disable Text Selection Except Specified Codes/Text With CSS


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 area other than codes/Text we want to share. This is possible with this simple CSS code where we enabled the copy paste of text/code we post in "blockquotes" only. Go to Blogger→Template→Edit Template→Backup.
Now search for ]]></b:skin> this code line and copy paste the CSS code given below before this ]]></b:skin> code line.
(Note:- use Ctrl+F in Windows and Cmd+F in Mac to search in template code)

/*----- Disable Text Selection with CSS Code--- TB----*/
.post blockquote {
-webkit-user-select: text !important;
-moz-user-select: text !important;
-ms-user-select: text !important;
user-select: text !important;
}
body {
-webkit-user-select: none !important;
-moz-user-select: -moz-none !important;
-ms-user-select: none !important;
user-select: none !important;
}

Important 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.  If you do not share any codes or content than just copy paste this little piece of CSS code to disable all text area on your blog.

/*----- Disable Text Selection with CSS Code--- TB----*/
body {
-webkit-user-select: none !important;
-moz-user-select: -moz-none !important;
-ms-user-select: none !important;
user-select: none !important;
}

Note:  You can add CSS codes by simply going to Template Designer >> Add custom CSS and paste your code then save.

Benefit of using CSS Code rather than JavaScript ?

1) When we use JavaScript code, do you know what does a copy cat do? Simply disables JavaScript code inside browser and reload the page. Then everything goes into normal and anyone can copy the whole content.

Using CSS code we eliminate this factor as user usually can not disable the CSS. However, an experienced user can do it simply by inspecting elements and finding our CSS code snippet then delete it in browser but this task is far away from newbies. Experienced users rarely do that.

2) CSS codes are far better than JavaScripts as they do not lower the speed of your blog/website where JavaScript codes consume much time to load and make your blog load speed very low and overall you lose Visitors=Money. Avoid using JavaScripts.

Let us know where these codes worked for you or you are having problems with these codes? We will serve you our best. Thank You.

COMMENTS

Name

11th,2,12th,20,12th Chemistry,5,12th Computer Science,7,12th Physics,1,5th Sem CSE,1,AAI ATC,2,Android,18,Banking,1,Blogger,41,Books,5,BTech,17,CBSE,22,CSE,4,ECE,3,Electronics,1,English,2,ESE,1,Ethical Hacking,61,Exams,5,Games,9,GATE,1,GATE ECE,1,Government Jobs,1,GS,1,How To,27,IBPS PO,1,Information,52,Internet,24,IPU,8,JEE,8,JEE Mains,8,Jobs,1,Linux,65,News,18,Notes,23,Physics,3,Placement,10,PO,1,Poetry,3,RRB,1,SEO,11,Softwares,38,SSC,2,SSC CGL,1,SSC GS,2,Tips and Tricks,46,UPSC,1,Windows,46,
ltr
item
SolutionRider- One Stop Solution for Notes, Exams Prep, Jobs & Technical Blogs.: Disable Copy Function On Blogger With CSS or JavaScript
Disable Copy Function On Blogger With CSS or JavaScript
Disable Copy Function On Blogger With CSS or JavaScript Most of the genuine bloggers on BlogSpot platform face the problem of their blogs' content being copied or duplicated by newbies who are just entering in the blogosphere with the goal of making money without making real efforts and understanding the value of original/unique content. Sometimes the content copied by them 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. We will disable the copy function by disabling the mouse right click and CTRL+A. We have two options for doing this i.e., via a JavaScript Code if you want to disable whole text area of blog or via CSS code if you share some codes/text on your blog posts and your readers need to copy them. Disable Text Selection On Blogger With JavaScript Code Go to Blogger→Template→Edit Template→Backup Your Template Code First. Now search for and copy paste the JavaScript Code given below after tag. (Note: - use Ctrl+F in Windows and Cmd+F in Mac to search for code in template) Now save your template and view your blog to check the results. Disable Text Selection Except Specified Codes/Text With CSS 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 area other than codes/Text we want to share. This is possible with this simple CSS code where we enabled the copy paste of text/code we post in "blockquotes" only. Go to Blogger→Template→Edit Template→Backup. Now search for ]]> this code line and copy paste the CSS code given below before this ]]> code line. (Note:- use Ctrl+F in Windows and Cmd+F in Mac to search in template code) /*----- Disable Text Selection with CSS Code--- TB----*/ .post blockquote { -webkit-user-select: text !important; -moz-user-select: text !important; -ms-user-select: text !important; user-select: text !important; } body { -webkit-user-select: none !important; -moz-user-select: -moz-none !important; -ms-user-select: none !important; user-select: none !important; } Important 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. If you do not share any codes or content than just copy paste this little piece of CSS code to disable all text area on your blog. /*----- Disable Text Selection with CSS Code--- TB----*/ body { -webkit-user-select: none !important; -moz-user-select: -moz-none !important; -ms-user-select: none !important; user-select: none !important; } Note: You can add CSS codes by simply going to Template Designer >> Add custom CSS and paste your code then save. Benefit of using CSS Code rather than JavaScript ? 1) When we use JavaScript code, do you know what does a copy cat do? Simply disables JavaScript code inside browser and reload the page. Then everything goes into normal and anyone can copy the whole content. Using CSS code we eliminate this factor as user usually can not disable the CSS. However, an experienced user can do it simply by inspecting elements and finding our CSS code snippet then delete it in browser but this task is far away from newbies. Experienced users rarely do that. 2) CSS codes are far better than JavaScripts as they do not lower the speed of your blog/website where JavaScript codes consume much time to load and make your blog load speed very low and overall you lose Visitors=Money. Avoid using JavaScripts. Let us know where these codes worked for you or you are having problems with these codes? We will serve you our best. Thank You.
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMSEhUTEBAVDxIXGBAQFRUPDw8PEBUQFRUXFhcVFRUYHSggGBolGxUVITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGBAQGC0dHR0tKy0tKy8tKysrKy0tLS0tLS0tKy0tLS0tLS0tLS0tKy0rLS0rLS0rLS0tKy0tLSsrK//AABEIAOEA4QMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAAAQIDBAYFBwj/xABHEAABAwICBQgGBQsCBwAAAAABAAIDBBEhMQUGEkFREyJhcXKBkaEHM1KxwdEUJDJCYhUWIzRTc4KSorLwwuEXNVRjk9Lx/8QAGQEAAwEBAQAAAAAAAAAAAAAAAAECAwQF/8QAIhEBAQACAgMAAgMBAAAAAAAAAAECMQMREiFBMlETImEE/9oADAMBAAIRAxEAPwD2+yLJUIBLIslUU9Sxgu94b1nHuCAksiy5M2sMQ+yHP6hYeaoVOsTzhGwM6Sdo/JXMMqm5yNHI5rRdxDRxJsFzKnTsLfskyH8NwPErMTTuebvcXHpJKjVzin1neT9OvUafkd9gBg73O8Th5Ko/S837Q+SpqrUvV+MnxHlb9dWLS837U+SrT6XqWn1rtk5Gw8FVppQc8/erIcD8ipywmU6Xhncb3sz8u1H7Z39KPy7Uftnf0qKalBxGB4bv9lVdGRmFx5YZ47duGeGWlmq0/UhptM7juWbrNa65rsKp9upvyXUmxXEqaU3xwPl/maiZVr4z9B2uFeM6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kpwKqqxM/cq6AEIQkCFU5XYq47JUJG380HEDs06LNNISx5oN0Ah2SRmSJMj1FBOZPkqTlcqCqTkqbm1DbE969W16h5TRbXDHZ+jyDwDSfBxXl1Y3Fetws5fQ4GZNN185rfm1Y8k9NuO+3iqEqRczsMmdYHwVElW6vLvUdFHtSRt4vjb4uASpNN/wAPqr24v53/APqlXr30ZC08Ix/krz3TXr5u3L/cVnand3oQsftdXyIF7RqX+owdj4lCFpx7Y8umf1z/AFyP91/qKroQu3DThz2EIQrQEIQgK02ZTEIQAhCEga/JUZd6EIOK6dHmhCDX25JUqEE5NQqbkISpqdbuXr+qf/LIv3T/AHuQhZZtMHiCRCFyO5BV5BGi/XRfvIv7whCPpV9FIQhbuV//2Q==
SolutionRider- One Stop Solution for Notes, Exams Prep, Jobs & Technical Blogs.
https://thesolutionrider.blogspot.com/2017/10/disable-copy-function-on-blogger-with.html
https://thesolutionrider.blogspot.com/
https://thesolutionrider.blogspot.com/
https://thesolutionrider.blogspot.com/2017/10/disable-copy-function-on-blogger-with.html
true
6820083649286484786
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy