"Right Click Block" and "Select Block" Blocker

Block the right click and mouse select blockers.

Verze ze dne 07. 12. 2014. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

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

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

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

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         "Right Click Block" and "Select Block" Blocker
// @version      0.1
// @description  Block the right click and mouse select blockers.
// @author       [email protected]
// @include      http://*/*
// @include      https://*/*
// @grant        none
// @namespace 	 https://greasyfork.org/users/6473
// ==/UserScript==

window.onload = function() {
    
    document.oncontextmenu=true;
    
    if(jQuery) {
        jQuery(document).unbind('contextmenu');
    }
    
    var css = "html, body {\
        -webkit-touch-callout: all !important;\
        -webkit-user-select: all !important;\
        -khtml-user-select: all !important;\
        -moz-user-select: all !important;\
        -ms-user-select: all !important;\
        user-select: all !important;\
	}";
    
    var head = document.head || document.getElementsByTagName('head')[0];
    var style = document.createElement('style');
    
    style.type = 'text/css';
    if (style.styleSheet){
      style.styleSheet.cssText = css;
    } else {
      style.appendChild(document.createTextNode(css));
    }
    
    head.appendChild(style);
   
};