Absolute Enable Right Click & Copy

Force Enable right click & Copy & Highlight

اعتبارا من 15-10-2016. شاهد أحدث إصدار.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         Absolute Enable Right Click & Copy
// @namespace    Absolute Right Click
// @description  Force Enable right click & Copy & Highlight
// @author       Absolute
// @version      1.1.7
// @include      http*://*
// @icon         https://cdn3.iconfinder.com/data/icons/communication-130/63/cursor-128.png
// @license      BSD
// @copyright    Absolute
// @grant        GM_addStyle
// @Exclude      /.*(JPG|PNG|GIF|JPEG|ico).*/

// ==/UserScript==

   document.body.setAttribute('oncontextmenu', 'return true');
   document.body.setAttribute('onselectstart', 'return true');
   document.body.setAttribute('ondragstart',   'return true');

   function clearEventListeners () {
   document.oncontextmenu = undefined;
   document.oncopy = undefined;
   document.oncut = undefined;
   document.onpaste = undefined;
   document.onselectstart = undefined;
   document.body.removeAttribute("oncopy");
   document.body.removeAttribute("ondrag");
   document.body.removeAttribute("oncontextmenu");
   document.body.removeAttribute("onselectstart");}
   window.addEventListener('load', clearEventListeners, false);

   setInterval(function () {
   document.oncontextmenu=null;
   document.contextmenu=null;
   document.ondragstart=null;
   document.onkeydown=null;
   document.onmousedown=null;
   document.onmousemove=null;
   document.onmouseup=null;
   document.onselectstart=null;
   document.selectstart=null;
   document.body.oncopy=null;
   document.body.onselect=null;
   document.body.onbeforecopy=null;
   document.body.contextmenu=null;
   document.body.oncontextmenu=null;
   document.body.ondragstart=null;
   document.body.onkeydown=null;
   document.body.onmousedown=null;
   document.body.onmousemove=null;
   document.body.onmouseup=null;
   document.body.selectstart=null;
   document.body.onselectstart=null;
   document.oncopy=null;
   window.oncopy=null;
   window.contextmenu=null;
   window.oncontextmenu=null;
   window.ondragstart=null;
   window.onkeydown=null;
   window.onmousedown=null;
   window.onmousemove=null;
   window.onmouseup=null;
   window.selectstart=null;
   window.onselectstart=null;
   window.onbeforeprint=null;
   },2000);

   var style = document.createElement('style');
   style.setAttribute('type', 'text/javascript');
   style.textContent = "$(function() {\n" + "$('body').off('copy contextmenu selectstart').unbind('contextmenu');\n" + "});";
   document.getElementsByTagName('body')[0].appendChild(style);[].forEach.call(document.querySelectorAll('[oncontextmenu]'),
   function(AllowCopy){AllowCopy.removeAttribute('oncontextmenu');});[].forEach.call(document.querySelectorAll('[onselectstart="return false;"]'),
   function(AllowCopy){AllowCopy.removeAttribute('onselectstart');});[].forEach.call(document.querySelectorAll('[onmousedown="return false;"]'),
   function(AllowCopy){AllowCopy.removeAttribute('onselectstart');});[].forEach.call(document.querySelectorAll('[oncopy]'),
   function(AllowCopy){AllowCopy.removeAttribute('oncopy');});[].forEach.call(document.querySelectorAll('[unselectable]'),
   function(AllowCopy){AllowCopy.removeAttribute('unselectable');});
   if (document.onmousedown === 'rightclick') { document.onmousedown = ''; }
   if (document.oncontextmenu) { document.oncontextmenu = ''; }
   GM_addStyle('*{user-select:text!important;-moz-user-select:text!important;-webkit-user-select:text!important;-webkit-user-drag:text!important;-khtml-user-select:text!important;-khtml-user-drag:text!important;}');

// Add Here Any Site to Activate "Absolute Right Click Enable Mod"
   var List = [ 'www.Site.com' ,'www.Site.com' , 'www.Site.com' ];
   Url = new RegExp(List.join('|'), "i");
   if (Url.test(document.body.textContent)) {
   document.addEventListener("contextmenu", function(e){ e.stopPropagation ();}, true);}