Hello, developers and bloggers! This article is usually for you. In this article TrickPk admin will show you how to deactivate right-clicking on a webpage and hide your website's source code ie (Disable view-source:).
These functions are possible by using below script code. All of your website's and blog's source codes can be hidden. No one will be able to access or copy the code of your web page with using this script.
What is the source code of a page?
Simply follow these easy steps to inspect the page source code of any website.
1. Open Google.com
2. Right-click the mouse, and a variety of options will appear. or Press Ctrl+U
3. The "View Page Source" option will appear.
4. You will see the Google Home source code.
How to Disable Web Page Right Click or Hide Page View Source Option
It's time to do best something now. You've come here to learn how to prevent the right-click mouse button from being used on any website. You will be given clear instructions on How to Disable view-source: function in Blogger. Read the instructions below carefully and follow them.
Select your blog in which you want to add this code or feature.
Go to ‘Template’ and then select ‘Edit Template’.
Now, just copy the below script code
Now, go to your template and find the </head> section.
Just paste the above script code before closing the head tag or section.
Save your template
For other Web Developers
Just copy the above script code.
Simply open Designing Code and put this script code anywhere in the head section.
Finally, this script code makes it simple to hide the source code of every web page. To prevent code theft, you can hide all of your website's source codes. Hiding the page source and turning off right-click functionality on a website is a very easy trick. If you do that's, leave a comment below with the URL of your website to have us check.