Halaman

Disable Web Page Right Click or Hide Page View Source Option

Disable Web Page Right Click or Hide Page View Source Option

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?

A type of file called a page source contains the HTML, Javascript, CSS, PHP, etc. code that is used to construct a web page. This capability is built into every online browser and works with any page that doesn't include script code to turn it off. When viewing or stealing any crucial code, one uses the page source code.

How to View Any Website Source Code?

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.

  1. Open blogger.com

  2. Select your blog in which you want to add this code or feature.

  3. Go to ‘Template’ and then select ‘Edit Template’.

  4. Now, just copy the below script code

  5. <script language="javascript"> document.onmousedown=disableclick; status="www.TrickPk.com"; Function disableclick(e) {   if(event.button==2)   {     alert(status);     return false;   } } </script>

  6. Now, go to your template and find the </head> section.

  7. Just paste the above script code before closing the head tag or section.

  8. Save your template

  9. That’s all.

Disable Web Page Right Click or Hide Page View Source Option

For other Web Developers

  • Just copy the above script code.

  • Simply open Designing Code and put this script code anywhere in the head section.

Outcomes:

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.

Related Post

No comments