How to add disable CTRL + U and right click to become auto redirect

Have you ever done pressing CTRL + U to see the code (View Page Source/View Page Info) on the Blog you are visiting? And have you ever pressed Right C

Have you ever done pressing CTRL + U to see the code (View Page Source/View Page Info) on the Blog you are visiting? And have you ever pressed Right Click on the blog you are visiting to COPAS an article?

How to add disable CTRL + U and right click to become auto redirect

This activity ( CTRL + U ) is usually carried out by bloggers who want to imitate the appearance of the blog so that it looks the SAME as the blog he is visiting and can COPAS the contents of the article by pressing CTRL + U even though an anti-COPAS script has been installed on the blog.

Well, if you want to prevent copy paste (COPAS) of posts/articles on your blog, turn off the right click function (disable right click) and simultaneously turn off CTRL + U, then follow these practical steps.

How to Add disable CTRL + U and right click to become auto redirect

  1. Go to Template > Edit HTML
  2. Put the code below just above the code </body>


<script type='text/javascript'>
//<![CDATA[
//Script Redirect CTRL + U
function redirectCU(e) {
  if (e.ctrlKey && e.which == 85) {
    window.location.replace("https://www.mrhasan.online/");
    return false;
  }
}
document.onkeydown = redirectCU;

//Script Redirect Klik Kanan
function redirectKK(e) {
  if (e.which == 3) {
    window.location.replace("https://www.mrhasan.online/");
    return false;
  }
}
document.oncontextmenu = redirectKK;
//]]>
</script>

If you only want to install the Disable CTRL + U code, here's the code:


<script type='text/javascript'>
//<![CDATA[
//Script Redirect CTRL + U
function redirectCU(e) {
  if (e.ctrlKey && e.which == 85) {
    window.location.replace("https://www.mrhasan.online/");
    return false;
  }
}
document.onkeydown = redirectCU;
//]]>
</script>

And if you only want to Disable Right Click :

Tips
Replace https://www.mrhasan.online/.idwith your blog address, this works if someone presses CTRL + U and Right Click will automatically redirect to your blog address.

  • Then Save .
  • That's all about how to disable CTRL + U and right click to become an auto redirect . Hope it is useful.

    MrHasan is a website where you can find html, css, js, seo, adsense, premium blogger templates, blogger tips and tricks, blogger widgets & many more.

    Post a Comment