解除网页右键限制

源码来自网络

A、压缩版源码(eval方式加密主体函数<eval开始是加密内容>,不能全部加密,因为谷歌标签不允许 eval 开头的路径)

javascript:(function(){eval(function(p,a,c,k,e,r){e=function(c){return c.toString(36)};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'[2-9a-hj-l]'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('5 2=6;5 3=2.body;3.7=3.d=3.e=3.9=3.8=3.onmousemove=3.7=3.ondragstart=2.7=2.d=2.e=2.9=2.8=4;2.7=2.8=2.a=2.9=function(){return true};f(6.g||6){h=4;a=4;8=4}5 b=6.getElementsByTagName(\'*\');for(5 i=b.length-1;i>=0;i--){5 c=b[i];f(c.g||c){h=4;a=4}}alert(unescape(\'%u5DF2%u89E3%u9664%u590D%j%u4E0E%u53F3%u952E%u9650%j%uFF01\')+\'\\nPower By Fantacy.\');3.k.webkitUserSelect=\'auto!l\';3.k.MozUserSelect=\'text!l\';',[],22,'||doc|bd|null|var|document|onselectstart|oncontextmenu|onkeydown|onmousedown|arAllElements|elmOne|oncopy|onpaste|with|wrappedJSObject|onmouseup||u5236|style|important'.split('|'),0,{}))})()

B、未压缩源码(alert内容中中文做了unicode转码)

javascript: (function() {
	var doc = document;
	var bd = doc.body;
	bd.onselectstart = bd.oncopy = bd.onpaste = bd.onkeydown = bd.oncontextmenu = bd.onmousemove = bd.onselectstart = bd.ondragstart = doc.onselectstart = doc.oncopy = doc.onpaste = doc.onkeydown = doc.oncontextmenu = null;
	doc.onselectstart = doc.oncontextmenu = doc.onmousedown = doc.onkeydown = function() {
		return true
	};
	with(document.wrappedJSObject || document) {
		onmouseup = null;
		onmousedown = null;
		oncontextmenu = null
	}
	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
		}
	}
	alert(unescape('%u5DF2%u89E3%u9664%u590D%u5236%u4E0E%u53F3%u952E%u9650%u5236%uFF01') + '\nPower By Fantacy.');
	bd.style.webkitUserSelect = 'auto!important';
	bd.style.MozUserSelect = 'text!important';
})()

C、使用方式(Chrome为例):

  1. 添加书签:打开任意网页(或直接当前页面),点击地址栏右边的添加书签的星星图标;
  2. 粘贴代码:名称任意写(比如:解除右键复制),地址就粘贴 A的代码;
  3. 解除限制:打开右键有限制的网页,点击书签 [解除右键复制],此时会有弹窗提示“右键已经解除限制……”;
  4. 复制内容:重新复制文本内容,已经可以正常复制了。(每个受限制页面都要点击 这个书签)

 

.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值