Absolute Enable Right Click & Copy

Force Enable right click & Copy & Highlight

Stan na 26-10-2016. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

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

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Absolute Enable Right Click & Copy
// @namespace    Absolute Right Click
// @description  Force Enable right click & Copy & Highlight
// @author       Absolute
// @version      1.2.1
// @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|pixiv.net).*/

// ==/UserScript==

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

   function RemoveEvent () {
   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', RemoveEvent, 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 Include_Sites = ['163.com' , 'www.site.com' , 'www.site.com' , 'www.site.com'];

   var Exclude_Sites = ['(www|drive|translate).google','youtube|bing|box|sync|dropbox|icloud|mega|mediafire.(?!com)'];

   var Check_urlSite = window.location.href;
   var Match_Include = RegExp(Include_Sites.join('|')).exec(Check_urlSite);
   var Match_Exclude = RegExp(Exclude_Sites.join('|')).exec(Check_urlSite);

   if (Match_Include) { ForceEnable (); }
   if (Match_Exclude) { } else { 
   document.addEventListener("contextmenu", function(e){ e.stopPropagation ();}, true);}

   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;}}`);

   function KeyPress (e) {
   if (e.altKey && e.ctrlKey) {
   alert("Absolute Right Click Mod Activate !!!");
   ForceEnable();
   }}
   document.addEventListener("keydown", KeyPress);

   function ForceEnable () {
   document.addEventListener("copy", function(e){e.stopPropagation();},true);
   document.addEventListener("keyup", function(e){e.stopPropagation();},true);
   document.addEventListener("mouseup", function(e){ e.stopPropagation();},true);
   document.addEventListener("keydown", function(e){ e.stopPropagation();},true);
   document.addEventListener("mousedown", function(e){e.stopPropagation();},true);
   document.addEventListener("dragstart", function(e){ e.stopPropagation();},true);
   document.addEventListener("mousedown", function(e) { e.stopPropagation();},true);
   document.addEventListener("contextmenu", function(e){ e.stopPropagation();},true);
   document.addEventListener("selectstart", function(e){ e.stopPropagation();},true);}