Disable 'disable right click'

Disables the ugly feature that disables right click

Pada tanggal 20 Desember 2015. Lihat %(latest_version_link).

// ==UserScript==
// @name         Disable 'disable right click'
// @namespace    https://github.com/mosaicer
// @author       mosaicer
// @description  Disables the ugly feature that disables right click
// @version      1.1
// @run-at       document-end
// @grant        GM_addStyle
// ==/UserScript==
(function () {
  'use strict';

  [].forEach.call(document.querySelectorAll('[oncontextmenu]'),
    function (targetNode) {
      targetNode.removeAttribute('oncontextmenu');
    }
  );

  [].forEach.call(document.querySelectorAll('[onselectstart="return false;"]'),
    function (targetNode) {
      targetNode.removeAttribute('onselectstart');
    }
  );

  [].forEach.call(document.querySelectorAll('[onmousedown="return false;"]'),
    function (targetNode) {
      targetNode.removeAttribute('onselectstart');
    }
  );

  if (document.onmousedown === 'rightclick') {
    document.onmousedown = '';
  }

  if (!!document.oncontextmenu) {
    document.oncontextmenu = '';
  }

  GM_addStyle('body {user-select: text; -moz-user-select: text; -webkit-user-select: text; -webkit-user-drag: text; -khtml-user-select: text; -khtml-user-drag: text; pointer-events: auto;}');
})();