解除360个人图书馆文档禁止复制限制Chrome浏览器插件

360个人图书馆的禁止复制着实烦人,在百度的搜索排名又高经常会搜索出其内容,不得已之下写个Chrome浏览器插件解决这个问题,下载地址:

https://download.csdn.net/download/ioriliao/13965600

完整的代码:

document.onmousedown = function(event){ 
	var event = event || window.event 
	if(event.button == "2"){ 
		var script=document.getElementById("JqueryObject");
		if(script){
			document.body.removeChild(script);
		}
		script=document.createElement("script");
		script.setAttribute("id","JqueryObject");
		script.innerHTML="JqueryObject=$;$={};";
		document.body.appendChild(script);
		console.log("onmousedown");
	}
}

document.onmouseup = function(event){ 
	var event = event || window.event 
	if(event.button == "2"){ 
		event.srcElement.onmouseout=function(){
			var iid=setInterval(function(){
				clearInterval(iid);
				var script=document.getElementById("JqueryObject");
				if(script){
					document.body.removeChild(script);
				}
				script=document.createElement("script");
				script.setAttribute("id","JqueryObject");
				script.innerHTML="$=JqueryObject;";
				document.body.appendChild(script);
				console.log("onmouseup");
				event.srcElement.onmouseout=function(){}
			},1000);
		}
	}
}

如果有不会使用或有bug报错的请加我微信:tai-yi-zhen-ren

 

已标记关键词 清除标记