2015-02-12

How to Remove Right Click or Copy restriction/protection from a website?

Sometimes, some annoying website, such as this site :3 disables the right-click or text selection to prevent people from copying their content, for example using this javascript and css before </body>

<script>
  document.body.oncopy = function(e){
    if (window.clipboardData) window.clipboardData.clearData();
    return false;
  };    
  document.body.onselectstart = function(e){ return false; };    
  document.oncontextmenu = function(){ return false; }
<script>
<style>
  html {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
</style>


How to disable them?
Just open the JavaScript Console (Ctrl+Shift+I on Chrome or Ctrl+Shift+K on Firefox), go to the Console tab and paste this command:

document.body.oncopy = document.body.onselectstart = document.oncontextmenu = null;

If the selection still not working, then go to the Element tab, just uncheck the css rules that contains substring user-select or touch-callout, like the picture below:


Voila, now you can select freely on their website ^_^)b


1 comment:

  1. The good news is though that it doesn't have to be unduly complicated and you are probably, in reality, facing only a relatively small number of options. Incidentally, this discussion excludes consideration of website hosting issues. cloning websites

    ReplyDelete

THINK: is it True? is it Helpful? is it Inspiring? is it Necessary? is it Kind?