Absolute Enable Right Click & Copy

Force Enable right click & Copy & Highlight

Od 26.10.2016.. Pogledajte najnovija verzija.

// ==UserScript==
// @name         Absolute Enable Right Click & Copy
// @namespace    Absolute Right Click
// @description  Force Enable right click & Copy & Highlight
// @author       Absolute
// @version      1.1.9
// @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 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 Exclude = ['app.box.com','www.dropbox.com','cp.sync.com','www.icloud.com','www.mega.nz','www.mediafire.com','translate.google','drive.google.com'];

   var url = window.location.href;
   var Match = RegExp(Exclude.join('|')).exec(url);
   if (Match) { } else {

   var Start = window.self;
   var Frame = Start.document;
   var iFrame = Frame.getElementsByTagName('body')[0];
   var ForceAdd = function(event) { event.stopImmediatePropagation(); };

   iFrame.addEventListener('contextmenu',ForceAdd,true);
   iFrame.addEventListener('keydown',ForceAdd,true);
   iFrame.addEventListener('keyup',ForceAdd,true);
   iFrame.addEventListener('mouseup',ForceAdd,true);
   iFrame.addEventListener('mousedown',ForceAdd,true);
   iFrame.addEventListener('dragstart',ForceAdd,true);
   iFrame.addEventListener('selectstart',ForceAdd,true);
   iFrame.addEventListener('copy',ForceAdd,true);
   }

   (function(css) {
   var head = Frame.getElementsByTagName("body")[0];
   if (head) {
   var style = Frame.createElement("style");
   style.textContent = css;
   style.type = "text/css";
   head.appendChild(style);
   }})('body, body * { -moz-user-focus:normal; -moz-user-select:text; -webkit-user-select:text; user-select:text; }');
   


长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元