From a876f27642fac04d06edc54096a75f4f1e9e2daf Mon Sep 17 00:00:00 2001
From: hhCandy
Date: Sun, 30 Dec 2018 02:32:26 +0800
Subject: [PATCH] support phone
---
easyVer.js.map | 98 ++++++++++++++++
easyVer.min.js | 311 +++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 398 insertions(+), 11 deletions(-)
diff --git a/easyVer.js.map b/easyVer.js.map
index 455df65..2d4ca31 100644
--- a/easyVer.js.map
+++ b/easyVer.js.map
@@ -119,6 +119,16 @@
});
moveStart = e.pageX;
});
+
+ $(".slider-btn").on("touchstart",function(e) {
+ e = e || window.event;
+ $(this).css({
+ "background-position": "0 -216px"
+ });
+ moveStart = e.targetTouches[0].pageX;
+ });
+
+
onmousemove = function(e) {
e = e || window.event;
var moveX = e.pageX;
@@ -140,6 +150,33 @@
}
}
};
+//add var for touchend to get location
+var touch_pageX;
+
+ $(".slider-btn").on("touchmove", function(e) {
+ e = e || window.event;
+ var moveX = e.targetTouches[0].pageX;
+ touch_pageX=moveX;
+ var d = moveX - moveStart;
+ if (moveStart == '') {} else {
+ if (d < 0 || d > (w - padding - PL_Size)) {} else {
+ $(".slider-btn").css({
+ "left": d + 'px',
+ "transition": "inherit"
+ });
+ $("#puzzleLost").css({
+ "left": d + 'px',
+ "transition": "inherit"
+ });
+ $("#puzzleShadow").css({
+ "left": d + 'px',
+ "transition": "inherit"
+ });
+ }
+ }
+ });
+
+
onmouseup = function(e) {
e = e || window.event;
var moveEnd_X = e.pageX - moveStart;
@@ -198,6 +235,67 @@
})
}
+
+ $(".slider-btn").on("touchend", function(e) {
+ e = e || window.event;
+ var moveEnd_X = touch_pageX - moveStart;
+ var ver_Num = X - 10;
+ var deviation = 4;
+ var Min_left = ver_Num - deviation;
+ var Max_left = ver_Num + deviation;
+ if (moveStart == '') {} else {
+ if (Max_left > moveEnd_X && moveEnd_X > Min_left) {
+ $(".ver-tips").html('Authority Confimed!');
+ $(".ver-tips").addClass("slider-tips");
+ $(".puzzle-lost-box").addClass("hidden");
+ $("#puzzleBox").addClass("hidden");
+ setTimeout(function() {
+ $(".ver-tips").removeClass("slider-tips");
+ imgVer(Config);easyVer_off();
+ },
+ 2000);
+
+ Config.success();
+ } else {
+ $(".ver-tips").html('Verification Failure!Please drag block to the right position!');
+ $(".ver-tips").addClass("slider-tips");
+ setTimeout(function() {
+ $(".ver-tips").removeClass("slider-tips");
+ document.getElementById("scream").src="https://cdn.yimian.ac.cn/easyVer/image.php?df="+Math.floor(Math.random()*10);
+ imgVer(Config);
+ },
+ 2000);
+
+ Config.error();
+ }
+ }
+ setTimeout(function() {
+ $(".slider-btn").css({
+ "left": '0',
+ "transition": "left 0.5s"
+ });
+ $("#puzzleLost").css({
+ "left": '0',
+ "transition": "left 0.5s"
+ });
+ $("#puzzleShadow").css({
+ "left": '0',
+ "transition": "left 0.5s"
+ });
+ },
+ 1000);
+ $(".slider-btn").css({
+ "background-position": "0 -84px"
+ });
+ moveStart = '';
+ $(".re-btn a").on("click",
+ function() {
+ imgVer(Config);
+ })
+
+ });
+
+
}
var callBackFunctionName="";
diff --git a/easyVer.min.js b/easyVer.min.js
index b7f2ccb..0006b47 100644
--- a/easyVer.min.js
+++ b/easyVer.min.js
@@ -1,11 +1,300 @@
-function imgVer(Config) {eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('5 E=1a(B.E);5 w=B.b;5 h=B.f;5 g=18;5 i=20;5 13=i+g;5 K=w-i-g-g/6;5 O=i;5 H=h-i-g-g/6;1d D(v,m){5 F=m-v;5 x=j.Z();Q(j.G(x*F)==0){C v+1}V Q(j.G(x*m)==m){C m-1}V{5 11=v+j.G(x*F)-1;C 11}}5 P="15://1o.1n.1p.1q/1l/1f.1h?1j="+j.1i(j.Z()*10);5 X=D(13,K);5 Y=D(H,O);5 I=-X+10;5 4=\'<7 8="e:n;i:A A S;r:o N #1k;M:#1e;r-J:A;">\';4+=\'<7 8="e:n;1g:1r;b:\'+w+\'9;">\';4+=\'<7 8="e:n;b:\'+w+\'9;f:\'+h+\'9;">\';4+=\'<1s l="1m" 17="\'+P+\'" 8="b:\'+w+\'9;f:\'+h+\'9;">\';4+=\'
1w 1L 1K 1M 1O 1N..
\';4+=\'7>\';4+=\'<7 y="1J-U">7>\';4+=\'7>\';E.4(4);5 d=g/3;5 c=1F.1E("W");5 1G=c.1I("1H");',62,127,'||||html|var||div|style|px||width|||position|height|PL_Size||padding|Math|canvas|id|Max|relative|1px||index|border|absolute|top|left|Min||Rand|class||16px|Config|return|RandomNum|el|Range|round|MinN_Y|left_Num|radius|MaxN_X|box|background|solid|MaxN_Y|imgSrc|if|margin|28px|right|btn|else|puzzleBox|||random||num||MinN_X|kuang|https|puzzle|src|48|puzzleShadow|eval|lost|111|function|f2ece1|image|overflow|php|floor|df|ddd|easyVer|scream|yimian|cdn|ac|cn|hidden|img|text|line|align|Slide|22px|486c80|font|inset|size|color|12px|getElementById|document|ctx|2d|getContext|slider|to|block|finish|jigsaw|the|auto|br|24px|c3c3c3|tips|ver|re|33|ece4dd|rgba|shadow||puzzleLost|'.split('|'),0,{})) -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('2.h="a";2.b=c;2.9="#5";2.8=3;2.6=3;2.e="4(0,0,0,0.7)";2.d();2.g="1";2.f="4(0,0,0,0)";',18,18,'||ctx||rgba|fff|shadowOffsetY||shadowOffsetX|shadowColor|xor|shadowBlur|10|beginPath|fillStyle|strokeStyle|lineWidth|globalCompositeOperation'.split('|'),0,{})) -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('5.8(4,1);5.6(4+0,1);5.7(4+0,1-0,4+2*0,1-0,4+2*0,1);5.6(4+3*0,1);5.6(4+3*0,1+0);5.7(4+2*0,1+0,4+2*0,1+2*0,4+3*0,1+2*0);5.6(4+3*0,1+3*0);5.6(4,1+3*0);',9,9,'d|Y|||X|ctx|lineTo|bezierCurveTo|moveTo'.split('|'),0,{})) -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('3.n();3.b();3.c();1 4=a.5("e");1 6=a.5("d");1 9=4.7("8");1 f=6.7("8");1 2=m p();2.o=l;2.i=g(){9.k(2,0,0,j,h)}',26,26,'|var|img|ctx|c_l|getElementById|c_s|getContext|2d|ctx_l|document|stroke|fill|puzzleShadow|puzzleLost|ctx_s|function||onload|w|drawImage|imgSrc|new|closePath|src|Image'.split('|'),0,{})) -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('7.b();7.e="c(0,0,0,0)";7.f(5,4);7.8(5+d,4);7.9(5+d,4-d,5+2*d,4-d,5+2*d,4);7.8(5+3*d,4);7.8(5+3*d,4+d);7.9(5+2*d,4+d,5+2*d,4+2*d,5+3*d,4+2*d);7.8(5+3*d,4+3*d);7.8(5,4+3*d);7.h();7.i();7.g=k;7.j="a";7.m();6.b();6.l="1";6.e="c(0,0,0,0)";6.f(5,4);6.8(5+d,4);6.9(5+d,4-d,5+2*d,4-d,5+2*d,4);6.8(5+3*d,4);6.8(5+3*d,4+d);6.9(5+2*d,4+d,5+2*d,4+2*d,5+3*d,4+2*d);6.8(5+3*d,4+3*d);6.8(5,4+3*d);6.h();6.i();6.g=n;6.j="a";6.o();',25,25,'||||Y|X|ctx_s|ctx_l|lineTo|bezierCurveTo|black|beginPath|rgba||strokeStyle|moveTo|shadowBlur|closePath|stroke|shadowColor|10|lineWidth|clip|20|fill'.split('|'),0,{})) -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('6 1=\'\';$(".7-8").5(2(e){e=e||4.3;$(9).d({"f-c":"0 -b"});1=e.a});',16,16,'|moveStart|function|event|window|mousedown|var|slider|btn|this|pageX|216px|position|css||background'.split('|'),0,{})) -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('N=8(e){e=e||H.G;6 C=e.E;6 d=C-g;h(g==\'\'){}m{h(d<0||d>(w-Z-Y)){}m{$(".5-j").7({"1":d+\'v\',"9":"s"});$("#J").7({"1":d+\'v\',"9":"s"});$("#L").7({"1":d+\'v\',"9":"s"})}}};V=8(e){e=e||H.G;6 q=e.E-g;6 o=X-10;6 p=4;6 z=o-p;6 K=o+p;h(g==\'\'){}m{h(K>q&&q>z){$(".b-2").D(\'<3 f="A:#U;">S T!3><3>3>\');$(".b-2").k("5-2");$(".12-13-11").k("y");$("#R").k("y");r(8(){$(".b-2").B("5-2");t(c);M()},I);c.Q()}m{$(".b-2").D(\'<3 f="A:O;">1k 1o!3><3 f="1p-1:n;">1q 1n 1l 1m 1x 1w l!3>\');$(".b-2").k("5-2");r(8(){$(".b-2").B("5-2");1v.1s("1r").1u="1t://1j.18.19.1a/17/14.15?16="+F.1b(F.1g()*10);t(c)},I);c.1h()}}r(8(){$(".5-j").7({"1":\'0\',"9":"1 0.u"});$("#J").7({"1":\'0\',"9":"1 0.u"});$("#L").7({"1":\'0\',"9":"1 0.u"})},1i);$(".5-j").7({"x-l":"0 -1f"});g=\'\';$(".1c-j a").1d("1e",8(){t(c)})}',62,96,'|left|tips|span||slider|var|css|function|transition||ver|Config|||style|moveStart|if||btn|addClass|position|else|4px|ver_Num|deviation|moveEnd_X|setTimeout|inherit|imgVer|5s|px||background|hidden|Min_left|color|removeClass|moveX|html|pageX|Math|event|window|2000|puzzleLost|Max_left|puzzleShadow|easyVer_off|onmousemove|red|1229px|success|puzzleBox|Authority|Confimed|42ca6b|onmouseup|1207px||PL_Size|padding||box|puzzle|lost|image|php|df|easyVer|yimian|ac|cn|floor|re|on|click|84px|random|error|1000|cdn|Verification|block|to|drag|Failure|margin|Please|scream|getElementById|https|src|document|right|the'.split('|'),0,{}))} -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('r 5="";$(".3").d("<6 g=\\"4\\" f=\\"h:j-i;\\">6>");$(".b").c(\'e\',2(){$(".3").9({"8":"0","7":"1"})});2 a(){4({k:\'$("#4")\',s:\'o\',t:\'v\',u:2(){n(5)m(5+"()")},l:2(){}})}2 q(){$(".3").9({"8":"p","7":"0"})}',32,32,'||function|verBox|imgVer|callBackFunctionName|div|opacity|left|css|easyVer|ver|on|html|click|style|id|display|block|inline|el|error|eval|if|260|404px|easyVer_off|var|width|height|success|116'.split('|'),0,{})) -eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('h.9(\'\\1\'+\' %c 4 a b %c 8://7.6/g/4 \'+\'\\1\',\'i: #e; 2: #f; 3:5 0;\',\'2: #d; 3:5 0;\');',19,19,'|n|background|padding|easyVer|5px|com|github|https|log|Vertification|Plugin||4682B4|00FFFF|030307|hhCandy|console|color'.split('|'),0,{})) - -function show_easyVer(){$(".verBox").css({"left":"0","opacity":"1" })} +function imgVer(Config) { + var el = eval(Config.el); + var w = Config.width; + var h = Config.height; + + var PL_Size = 48; + var padding = 20; + var MinN_X = padding + PL_Size; + var MaxN_X = w - padding - PL_Size - PL_Size / 6; + var MaxN_Y = padding; + var MinN_Y = h - padding - PL_Size - PL_Size / 6; + function RandomNum(Min, Max) { + var Range = Max - Min; + var Rand = Math.random(); + if (Math.round(Rand * Range) == 0) { + return Min + 1; + } else if (Math.round(Rand * Max) == Max) { + return Max - 1; + } else { + var num = Min + Math.round(Rand * Range) - 1; + return num; + } + } + + var imgSrc = "https://cdn.yimian.ac.cn/easyVer/image.php?df="+Math.floor(Math.random()*10); + var X = RandomNum(MinN_X, MaxN_X); + var Y = RandomNum(MinN_Y, MaxN_Y); + var left_Num = -X + 10; + var html = ''; + html += ' '; + html += 'Slide block to finish the jigsaw..
'; + html += '