一个网页不能复制的小技巧

自用保存:无法复制的网页,使用下面的代码,就可以复制了

javascript:(function(bookmarklets){for(var i=0;i<bookmarklets.length;i++){var code=bookmarklets[i].url;if(code.indexOf("javascript:")!=-1){code=code.replace("javascript:","");eval(code)}else{code=code.replace(/^s+|s+$/g,"");if(code.length>0){window.open(code)}}}})([{title:"%E7%A0%B4%E9%99%A4%E5%8F%B3%E9%94%AE%E8%8F%9C%E5%8D%95%E9%99%90%E5%88%B6",url:"javascript:function applyWin(a){if(typeof a.__nnANTImm__===\x22undefined\x22){a.__nnANTImm__={};a.__nnANTImm__.evts=[\x22mousedown\x22,\x22mousemove\x22,\x22copy\x22,\x22contextmenu\x22];a.__nnANTImm__.initANTI=function(){a.__nnantiflag__=true;a.__nnANTImm__.evts.forEach(function(c,b,d){a.addEventListener(c,this.fnANTI,true)},a.__nnANTImm__)};a.__nnANTImm__.clearANTI=function(){delete a.__nnantiflag__;a.__nnANTImm__.evts.forEach(function(c,b,d){a.removeEventListener(c,this.fnANTI,true)},a.__nnANTImm__);delete a.__nnANTImm__};a.__nnANTImm__.fnANTI=function(b){b.stopPropagation();return true};a.addEventListener(\x22unload\x22,function(b){a.removeEventListener(\x22unload\x22,arguments.callee,false);if(a.__nnantiflag__===true){a.__nnANTImm__.clearANTI()}},false)}a.__nnantiflag__===true?a.__nnANTImm__.clearANTI():a.__nnANTImm__.initANTI()}applyWin(top);var fs=top.document.querySelectorAll(\x22frame, iframe\x22);for(var i=0,len=fs.length;i<len;i++){var win=fs[i].contentWindow;try{win.document}catch(ex){continue}applyWin(fs[i].contentWindow)};void 0;"}])

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值