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