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