禁用各种网页限制,包含右键,复制,选择文字。
// ==UserScript==
// @nameAnti Disabler For All
// @description禁用各种网页限制,包含右键,复制,选择文字。
// @namespace b8a2c97204b09fc19cf99340f5fae276
// @include*
// @excludehttp*://mail.google.com/*
// @excludehttp://maps.google.com/*
// @authorejin
// @version2013.09.08
// ==/UserScript==
function restore(){
with (document.wrappedJSObject || document) {
onmouseup = null;
onmousedown = null;
oncontextmenu = null;
// *
onselectstart = null
onbeforecopy = null
onkeydown = null
onkeydown = null
}
// *
void(document.body.οnmοuseup='');
void(document.body.onselectstart='');
void(document.body.οnmοuseup='');
void(document.body.οncοpy='');
var arAllElements = document.getElementsByTagName('*');
for (var i = arAllElements.length - 1; i >= 0; i--) {
var elmOne = arAllElements[i];
with (elmOne.wrappedJSObject || elmOne) {
onmouseup = null;
onmousedown = null;
}
}
}
window.addEventListener('load',restore,true);
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle("html, * {-moz-user-select:text!important;}");