From 3f8aca11114ca98cda06c45b1f0633fed4b3a529 Mon Sep 17 00:00:00 2001 From: WuHao <2323333339@qq.com> Date: Fri, 20 May 2022 16:45:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=9D=99=E6=80=81?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archive.php | 2 +- assets/backdrop/backdrop5.js | 1263 +++++++++++++++++++++++++++++++++- assets/js/joe.global.js | 1112 ++++++++++++++++-------------- assets/js/joe.global.min.js | 404 ++++++++++- census.php | 2 +- core/factory.php | 8 +- core/function.php | 4 +- friends.php | 6 +- functions.php | 140 ++-- index.php | 8 +- leaving.php | 2 +- library/files.php | 28 +- library/player.php | 4 +- package.json | 26 +- page.php | 6 +- post.php | 6 +- public/include.php | 32 +- 17 files changed, 2406 insertions(+), 647 deletions(-) diff --git a/archive.php b/archive.php index 012c2c1..54daedb 100644 --- a/archive.php +++ b/archive.php @@ -3,7 +3,7 @@ need('public/include.php'); ?> - + diff --git a/assets/backdrop/backdrop5.js b/assets/backdrop/backdrop5.js index 74a7c0c..1847aef 100644 --- a/assets/backdrop/backdrop5.js +++ b/assets/backdrop/backdrop5.js @@ -1 +1,1262 @@ -(function(){var t=function(){"use strict";function t(){return{LEFT:0,RIGHT:1,INTERSECTS:2,AHEAD:3,BEHIND:4,SEPARATE:5,UNDEFINED:6}}var e=Math.tan,s=Math.pow,i=Math.cos,h=Math.sin,a=Math.PI,n=Math.sqrt,l=Math.max,r=Math.min,o=Math.abs,c=Number.MAX_VALUE;class p{constructor(e,s,i,h){this.RoughSegmentRelationConst=t(),this.px1=e,this.py1=s,this.px2=i,this.py2=h,this.xi=c,this.yi=c,this.a=h-s,this.b=e-i,this.c=i*s-e*h,this._undefined=0==this.a&&0==this.b&&0==this.c}isUndefined(){return this._undefined}compare(t){if(this.isUndefined()||t.isUndefined())return this.RoughSegmentRelationConst.UNDEFINED;var e=c,s=c,i=0,h=0,a=this.a,n=this.b,p=this.c;return 1e-5=r(t.py1,t.py2)&&this.py1<=l(t.py1,t.py2)?(this.xi=this.px1,this.yi=this.py1,this.RoughSegmentRelationConst.INTERSECTS):this.py2>=r(t.py1,t.py2)&&this.py2<=l(t.py1,t.py2)?(this.xi=this.px2,this.yi=this.py2,this.RoughSegmentRelationConst.INTERSECTS):this.RoughSegmentRelationConst.SEPARATE:this.RoughSegmentRelationConst.SEPARATE:(this.xi=this.px1,this.yi=s*this.xi+h,-1e-5>(this.py1-this.yi)*(this.yi-this.py2)||-1e-5>(t.py1-this.yi)*(this.yi-t.py2)?this.RoughSegmentRelationConst.SEPARATE:1e-5>o(t.a)&&-1e-5>(t.px1-this.xi)*(this.xi-t.px2)?this.RoughSegmentRelationConst.SEPARATE:this.RoughSegmentRelationConst.INTERSECTS):s==c?(this.xi=t.px1,this.yi=e*this.xi+i,-1e-5>(t.py1-this.yi)*(this.yi-t.py2)||-1e-5>(this.py1-this.yi)*(this.yi-this.py2)?this.RoughSegmentRelationConst.SEPARATE:1e-5>o(a)&&-1e-5>(this.px1-this.xi)*(this.xi-this.px2)?this.RoughSegmentRelationConst.SEPARATE:this.RoughSegmentRelationConst.INTERSECTS):e==s?i==h?this.px1>=r(t.px1,t.px2)&&this.px1<=l(t.py1,t.py2)?(this.xi=this.px1,this.yi=this.py1,this.RoughSegmentRelationConst.INTERSECTS):this.px2>=r(t.px1,t.px2)&&this.px2<=l(t.px1,t.px2)?(this.xi=this.px2,this.yi=this.py2,this.RoughSegmentRelationConst.INTERSECTS):this.RoughSegmentRelationConst.SEPARATE:this.RoughSegmentRelationConst.SEPARATE:(this.xi=(h-i)/(e-s),this.yi=e*this.xi+i,-1e-5>(this.px1-this.xi)*(this.xi-this.px2)||-1e-5>(t.px1-this.xi)*(this.xi-t.px2)?this.RoughSegmentRelationConst.SEPARATE:this.RoughSegmentRelationConst.INTERSECTS)}getLength(){return this._getLength(this.px1,this.py1,this.px2,this.py2)}_getLength(t,e,s,i){var h=s-t,a=i-e;return n(h*h+a*a)}}class f{constructor(t,e,s,i,h,a,n,l){this.top=t,this.bottom=e,this.left=s,this.right=i,this.gap=h,this.sinAngle=a,this.tanAngle=l,1e-4>o(a)?this.pos=s+h:.9999o(this.sinAngle)){if(this.posthis.right&&s>this.right;)if(this.pos+=this.hGap,e=this.pos-this.deltaX/2,s=this.pos+this.deltaX/2,this.pos>this.right+this.deltaX)return null;let a=new p(e,i,s,h);a.compare(this.sLeft)==t().INTERSECTS&&(e=a.xi,i=a.yi),a.compare(this.sRight)==t().INTERSECTS&&(s=a.xi,h=a.yi),0d){let t=n(1-d/(this._rx*this._rx*this._ry*this._ry));this._rx=t,this._ry=t,f=0}else f=(r==c?-1:1)*n(d/(this._rx*this._rx*g*g+this._ry*this._ry*u*u));let _=f*this._rx*g/this._ry,y=-f*this._ry*u/this._rx;this._C=[0,0],this._C[0]=this._cosPhi*_-this._sinPhi*y+(t[0]+e[0])/2,this._C[1]=this._sinPhi*_+this._cosPhi*y+(t[1]+e[1])/2,this._theta=this.calculateVectorAngle(1,0,(u-_)/this._rx,(g-y)/this._ry);let x=this.calculateVectorAngle((u-_)/this._rx,(g-y)/this._ry,(-u-_)/this._rx,(-g-y)/this._ry);!c&&0x&&(x+=2*a),this._numSegs=Math.ceil(o(x/(a/2))),this._delta=x/this._numSegs,this._T=8/3*h(this._delta/4)*h(this._delta/4)/h(this._delta/2),this._from=t}getNextSegment(){var t,e,s;if(this._segIndex==this._numSegs)return null;let a=i(this._theta),n=h(this._theta),l=this._theta+this._delta,r=i(l),o=h(l);return s=[this._cosPhi*this._rx*r-this._sinPhi*this._ry*o+this._C[0],this._sinPhi*this._rx*r+this._cosPhi*this._ry*o+this._C[1]],t=[this._from[0]+this._T*(-this._cosPhi*this._rx*n-this._sinPhi*this._ry*a),this._from[1]+this._T*(-this._sinPhi*this._rx*n+this._cosPhi*this._ry*a)],e=[s[0]+this._T*(this._cosPhi*this._rx*o+this._sinPhi*this._ry*r),s[1]+this._T*(this._sinPhi*this._rx*o-this._cosPhi*this._ry*r)],this._theta=l,this._from=[s[0],s[1]],this._segIndex++,{cp1:t,cp2:e,to:s}}calculateVectorAngle(t,e,s,i){var h=Math.atan2;let n=h(e,t),l=h(i,s);return l>=n?l-n:2*a-(n-l)}}class y{constructor(t,e){this.sets=t,this.closed=e}fit(t){let e=[];for(const s of this.sets){let i=s.length,h=Math.floor(t*i);if(5>h){if(5>=i)continue;h=5}e.push(this.reduce(s,h))}let s="";for(const t of e){for(let e,i=0;ie;){let t=-1,e=-1;for(let i=1;it||ox;)x+=2*a,b+=2*a;b-x>2*a&&(x=0,b=2*a);let m=2*a/u.curveStepCount,w=r(m/2,(b-x)/2),O=this._arc(w,g,d,_,y,x,b,1,u),S=this._arc(w,g,d,_,y,x,b,1.5,u),v=O.concat(S);return p&&(f?(v=v.concat(this._doubleLine(g,d,g+_*i(x),d+y*h(x),u)),v=v.concat(this._doubleLine(g,d,g+_*i(b),d+y*h(b),u))):(v.push({op:"lineTo",data:[g,d]}),v.push({op:"lineTo",data:[g+_*i(x),d+y*h(x)]}))),{type:"path",ops:v}}hachureFillArc(t,e,s,n,l,r,c){let p=t,f=e,u=o(s/2),g=o(n/2);u+=this._getOffset(.01*-u,.01*u,c),g+=this._getOffset(.01*-g,.01*g,c);let d=l,_=r;for(;0>d;)d+=2*a,_+=2*a;_-d>2*a&&(d=0,_=2*a);let y=(_-d)/c.curveStepCount,x=[],b=[];for(let t=d;t<=_;t+=y)x.push(p+u*i(t)),b.push(f+g*h(t));return x.push(p+u*i(_)),b.push(f+g*h(_)),x.push(p),b.push(f),this.hachureFillShape(x,b,c)}solidFillShape(t,e,s){let i=[];if(t&&e&&t.length&&e.length&&t.length===e.length){let a=s.maxRandomnessOffset||0;const n=t.length;if(2_&&(_=4*n.strokeWidth),_=l(_,.1);const y=d%180*(a/180),x=i(y),b=h(y),m=e(y),w=new f(u-1,g+1,c-1,p+1,_,b,x,m);for(let e;null!=(e=w.getNextLine());){let i=this._getIntersectingLines(e,t,s);for(let t=0;t=u&&(u=4*l.strokeWidth);let g=l.fillWeight;0>g&&(g=l.strokeWidth/2);let d=e(f%180*(a/180)),_=p/c,y=n(_*d*_*d+1),x=_*d/y,b=1/y,m=u/(c*p/n(p*b*(p*b)+c*x*(c*x))/c),w=n(c*c-(t-c+m)*(t-c+m));for(var O=t-c+m;Op;p++)0===p?r.push({op:"move",data:[n.x,n.y]}):r.push({op:"move",data:[n.x+this._getOffset(-o[0],o[0],l),n.y+this._getOffset(-o[0],o[0],l)]}),c=[h+this._getOffset(-o[p],o[p],l),a+this._getOffset(-o[p],o[p],l)],r.push({op:"bcurveTo",data:[t+this._getOffset(-o[p],o[p],l),e+this._getOffset(-o[p],o[p],l),s+this._getOffset(-o[p],o[p],l),i+this._getOffset(-o[p],o[p],l),c[0],c[1]]});return n.setPosition(c[0],c[1]),r}_processSegment(t,e,s,i){let h=[];switch(e.key){case"M":case"m":{let s="m"===e.key;if(2<=e.data.length){let a=+e.data[0],n=+e.data[1];s&&(a+=t.x,n+=t.y);let l=1*(i.maxRandomnessOffset||0);a+=this._getOffset(-l,l,i),n+=this._getOffset(-l,l,i),t.setPosition(a,n),h.push({op:"move",data:[a,n]})}break}case"L":case"l":{let s="l"===e.key;if(2<=e.data.length){let a=+e.data[0],n=+e.data[1];s&&(a+=t.x,n+=t.y),h=h.concat(this._doubleLine(t.x,t.y,a,n,i)),t.setPosition(a,n)}break}case"H":case"h":{const s="h"===e.key;if(e.data.length){let a=+e.data[0];s&&(a+=t.x),h=h.concat(this._doubleLine(t.x,t.y,a,t.y,i)),t.setPosition(a,t.y)}break}case"V":case"v":{const s="v"===e.key;if(e.data.length){let a=+e.data[0];s&&(a+=t.y),h=h.concat(this._doubleLine(t.x,t.y,t.x,a,i)),t.setPosition(t.x,a)}break}case"Z":case"z":t.first&&(h=h.concat(this._doubleLine(t.x,t.y,t.first[0],t.first[1],i)),t.setPosition(t.first[0],t.first[1]),t.first=null);break;case"C":case"c":{const s="c"===e.key;if(6<=e.data.length){let a=+e.data[0],n=+e.data[1],l=+e.data[2],r=+e.data[3],o=+e.data[4],c=+e.data[5];s&&(a+=t.x,l+=t.x,o+=t.x,n+=t.y,r+=t.y,c+=t.y);let p=this._bezierTo(a,n,l,r,o,c,t,i);h=h.concat(p),t.bezierReflectionPoint=[o+(o-l),c+(c-r)]}break}case"S":case"s":{const n="s"===e.key;if(4<=e.data.length){let l=+e.data[0],r=+e.data[1],o=+e.data[2],c=+e.data[3];n&&(l+=t.x,o+=t.x,r+=t.y,c+=t.y);let p=l,f=r,u=s?s.key:"";var a=null;("c"==u||"C"==u||"s"==u||"S"==u)&&(a=t.bezierReflectionPoint),a&&(p=a[0],f=a[1]);let g=this._bezierTo(p,f,l,r,o,c,t,i);h=h.concat(g),t.bezierReflectionPoint=[o+(o-l),c+(c-r)]}break}case"Q":case"q":{const s="q"===e.key;if(4<=e.data.length){let a=+e.data[0],n=+e.data[1],l=+e.data[2],r=+e.data[3];s&&(a+=t.x,l+=t.x,n+=t.y,r+=t.y);let o=1*(1+.2*i.roughness),c=1.5*(1+.22*i.roughness);h.push({op:"move",data:[t.x+this._getOffset(-o,o,i),t.y+this._getOffset(-o,o,i)]});let p=[l+this._getOffset(-o,o,i),r+this._getOffset(-o,o,i)];h.push({op:"qcurveTo",data:[a+this._getOffset(-o,o,i),n+this._getOffset(-o,o,i),p[0],p[1]]}),h.push({op:"move",data:[t.x+this._getOffset(-c,c,i),t.y+this._getOffset(-c,c,i)]}),p=[l+this._getOffset(-c,c,i),r+this._getOffset(-c,c,i)],h.push({op:"qcurveTo",data:[a+this._getOffset(-c,c,i),n+this._getOffset(-c,c,i),p[0],p[1]]}),t.setPosition(p[0],p[1]),t.quadReflectionPoint=[l+(l-a),r+(r-n)]}break}case"T":case"t":{const n="t"===e.key;if(2<=e.data.length){let l=+e.data[0],r=+e.data[1];n&&(l+=t.x,r+=t.y);let o=l,c=r,p=s?s.key:"";a=null,("q"==p||"Q"==p||"t"==p||"T"==p)&&(a=t.quadReflectionPoint),a&&(o=a[0],c=a[1]);let f=1*(1+.2*i.roughness),u=1.5*(1+.22*i.roughness);h.push({op:"move",data:[t.x+this._getOffset(-f,f,i),t.y+this._getOffset(-f,f,i)]});let g=[l+this._getOffset(-f,f,i),r+this._getOffset(-f,f,i)];h.push({op:"qcurveTo",data:[o+this._getOffset(-f,f,i),c+this._getOffset(-f,f,i),g[0],g[1]]}),h.push({op:"move",data:[t.x+this._getOffset(-u,u,i),t.y+this._getOffset(-u,u,i)]}),g=[l+this._getOffset(-u,u,i),r+this._getOffset(-u,u,i)],h.push({op:"qcurveTo",data:[o+this._getOffset(-u,u,i),c+this._getOffset(-u,u,i),g[0],g[1]]}),t.setPosition(g[0],g[1]),t.quadReflectionPoint=[l+(l-o),r+(r-c)]}break}case"A":case"a":{const s="a"===e.key;if(7<=e.data.length){let a=+e.data[0],n=+e.data[1],l=+e.data[2],r=+e.data[3],o=+e.data[4],c=+e.data[5],p=+e.data[6];if(s&&(c+=t.x,p+=t.y),c==t.x&&p==t.y)break;if(0==a||0==n)h=h.concat(this._doubleLine(t.x,t.y,c,p,i)),t.setPosition(c,p);else{i.maxRandomnessOffset;for(let e=0;1>e;e++){let e=new _([t.x,t.y],[c,p],[a,n],l,!!r,!!o),s=e.getNextSegment();for(;s;){let a=this._bezierTo(s.cp1[0],s.cp1[1],s.cp2[0],s.cp2[1],s.to[0],s.to[1],t,i);h=h.concat(a),s=e.getNextSegment()}}}}break}}return h}_getOffset(t,e,s){return s.roughness*(Math.random()*(e-t)+t)}_affine(t,e,s,i,h,a,n){return[-s*a-i*h+s+a*t+h*e,n*(s*h-i*a)+i+-n*h*t+n*a*e]}_doubleLine(t,e,s,i,h){const a=this._line(t,e,s,i,h,!0,!1),n=this._line(t,e,s,i,h,!0,!0);return a.concat(n)}_line(t,e,i,h,a,l,r){const o=s(t-i,2)+s(e-h,2);let c=a.maxRandomnessOffset||0;c*c*100>o&&(c=n(o)/10);const p=c/2,f=.2+.2*Math.random();let u=a.bowing*a.maxRandomnessOffset*(h-e)/200,g=a.bowing*a.maxRandomnessOffset*(t-i)/200;u=this._getOffset(-u,u,a),g=this._getOffset(-g,g,a);let d=[];return l&&(r?d.push({op:"move",data:[t+this._getOffset(-p,p,a),e+this._getOffset(-p,p,a)]}):d.push({op:"move",data:[t+this._getOffset(-c,c,a),e+this._getOffset(-c,c,a)]})),r?d.push({op:"bcurveTo",data:[u+t+(i-t)*f+this._getOffset(-p,p,a),g+e+(h-e)*f+this._getOffset(-p,p,a),u+t+2*(i-t)*f+this._getOffset(-p,p,a),g+e+2*(h-e)*f+this._getOffset(-p,p,a),i+this._getOffset(-p,p,a),h+this._getOffset(-p,p,a)]}):d.push({op:"bcurveTo",data:[u+t+(i-t)*f+this._getOffset(-c,c,a),g+e+(h-e)*f+this._getOffset(-c,c,a),u+t+2*(i-t)*f+this._getOffset(-c,c,a),g+e+2*(h-e)*f+this._getOffset(-c,c,a),i+this._getOffset(-c,c,a),h+this._getOffset(-c,c,a)]}),d}_curve(t,e,s){const i=t.length;let h=[];if(3i&&(i=s.strokeWidth/2),t.save(),t.strokeStyle=s.fill,t.lineWidth=i,this._drawToContext(t,e),t.restore()}_drawToContext(t,e){t.beginPath();for(let s of e.ops){const e=s.data;switch(s.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"qcurveTo":t.quadraticCurveTo(e[0],e[1],e[2],e[3]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill():t.stroke()}}class O extends w{_init(t){this.gen=new m(t,this.canvas)}async line(t,e,s,i,h){let a=await this.gen.line(t,e,s,i,h);return this.draw(a),a}async rectangle(t,e,s,i,h){let a=await this.gen.rectangle(t,e,s,i,h);return this.draw(a),a}async ellipse(t,e,s,i,h){let a=await this.gen.ellipse(t,e,s,i,h);return this.draw(a),a}async circle(t,e,s,i){let h=await this.gen.circle(t,e,s,i);return this.draw(h),h}async linearPath(t,e){let s=await this.gen.linearPath(t,e);return this.draw(s),s}async polygon(t,e){let s=await this.gen.polygon(t,e);return this.draw(s),s}async arc(t,e,s,i,h,a,n,l){let r=await this.gen.arc(t,e,s,i,h,a,n,l);return this.draw(r),r}async curve(t,e){let s=await this.gen.curve(t,e);return this.draw(s),s}async path(t,e){let s=await this.gen.path(t,e);return this.draw(s),s}}var S={canvas:(t,e)=>e&&e.async?new O(t,e):new w(t,e),createRenderer:()=>w.createRenderer(),generator:(t,e)=>t&&t.async?new m(t,e):new b(t,e)};return S}(),e=function(t){for(var e=arguments.length,s=Array(e>1?e-1:0),i=1;i= r(t.py1, t.py2) && this.py1 <= l(t.py1, t.py2) + ? ((this.xi = this.px1), (this.yi = this.py1), this.RoughSegmentRelationConst.INTERSECTS) + : this.py2 >= r(t.py1, t.py2) && this.py2 <= l(t.py1, t.py2) + ? ((this.xi = this.px2), (this.yi = this.py2), this.RoughSegmentRelationConst.INTERSECTS) + : this.RoughSegmentRelationConst.SEPARATE + : this.RoughSegmentRelationConst.SEPARATE + : ((this.xi = this.px1), + (this.yi = s * this.xi + h), + -1e-5 > (this.py1 - this.yi) * (this.yi - this.py2) || -1e-5 > (t.py1 - this.yi) * (this.yi - t.py2) + ? this.RoughSegmentRelationConst.SEPARATE + : 1e-5 > o(t.a) && -1e-5 > (t.px1 - this.xi) * (this.xi - t.px2) + ? this.RoughSegmentRelationConst.SEPARATE + : this.RoughSegmentRelationConst.INTERSECTS) + : s == c + ? ((this.xi = t.px1), + (this.yi = e * this.xi + i), + -1e-5 > (t.py1 - this.yi) * (this.yi - t.py2) || -1e-5 > (this.py1 - this.yi) * (this.yi - this.py2) + ? this.RoughSegmentRelationConst.SEPARATE + : 1e-5 > o(a) && -1e-5 > (this.px1 - this.xi) * (this.xi - this.px2) + ? this.RoughSegmentRelationConst.SEPARATE + : this.RoughSegmentRelationConst.INTERSECTS) + : e == s + ? i == h + ? this.px1 >= r(t.px1, t.px2) && this.px1 <= l(t.py1, t.py2) + ? ((this.xi = this.px1), (this.yi = this.py1), this.RoughSegmentRelationConst.INTERSECTS) + : this.px2 >= r(t.px1, t.px2) && this.px2 <= l(t.px1, t.px2) + ? ((this.xi = this.px2), (this.yi = this.py2), this.RoughSegmentRelationConst.INTERSECTS) + : this.RoughSegmentRelationConst.SEPARATE + : this.RoughSegmentRelationConst.SEPARATE + : ((this.xi = (h - i) / (e - s)), + (this.yi = e * this.xi + i), + -1e-5 > (this.px1 - this.xi) * (this.xi - this.px2) || -1e-5 > (t.px1 - this.xi) * (this.xi - t.px2) ? this.RoughSegmentRelationConst.SEPARATE : this.RoughSegmentRelationConst.INTERSECTS) + ); + } + getLength() { + return this._getLength(this.px1, this.py1, this.px2, this.py2); + } + _getLength(t, e, s, i) { + var h = s - t, + a = i - e; + return n(h * h + a * a); + } + } + class f { + constructor(t, e, s, i, h, a, n, l) { + (this.top = t), + (this.bottom = e), + (this.left = s), + (this.right = i), + (this.gap = h), + (this.sinAngle = a), + (this.tanAngle = l), + 1e-4 > o(a) + ? (this.pos = s + h) + : 0.9999 < o(a) + ? (this.pos = t + h) + : ((this.deltaX = (e - t) * o(l)), (this.pos = s - o(this.deltaX)), (this.hGap = o(h / n)), (this.sLeft = new p(s, e, s, t)), (this.sRight = new p(i, e, i, t))); + } + getNextLine() { + if (1e-4 > o(this.sinAngle)) { + if (this.pos < this.right) { + let t = [this.pos, this.top, this.pos, this.bottom]; + return (this.pos += this.gap), t; + } + } else if (0.9999 < o(this.sinAngle)) { + if (this.pos < this.bottom) { + let t = [this.left, this.pos, this.right, this.pos]; + return (this.pos += this.gap), t; + } + } else { + let e = this.pos - this.deltaX / 2, + s = this.pos + this.deltaX / 2, + i = this.bottom, + h = this.top; + if (this.pos < this.right + this.deltaX) { + for (; (e < this.left && s < this.left) || (e > this.right && s > this.right); ) + if (((this.pos += this.hGap), (e = this.pos - this.deltaX / 2), (s = this.pos + this.deltaX / 2), this.pos > this.right + this.deltaX)) return null; + let a = new p(e, i, s, h); + a.compare(this.sLeft) == t().INTERSECTS && ((e = a.xi), (i = a.yi)), + a.compare(this.sRight) == t().INTERSECTS && ((s = a.xi), (h = a.yi)), + 0 < this.tanAngle && ((e = this.right - (e - this.left)), (s = this.right - (s - this.left))); + let n = [e, i, s, h]; + return (this.pos += this.hGap), n; + } + } + return null; + } + } + class u { + constructor(t, e) { + (this.type = t), (this.text = e); + } + isType(t) { + return this.type === t; + } + } + class g { + constructor(t) { + (this.PARAMS = { + A: ["rx", "ry", "x-axis-rotation", "large-arc-flag", "sweep-flag", "x", "y"], + a: ["rx", "ry", "x-axis-rotation", "large-arc-flag", "sweep-flag", "x", "y"], + C: ["x1", "y1", "x2", "y2", "x", "y"], + c: ["x1", "y1", "x2", "y2", "x", "y"], + H: ["x"], + h: ["x"], + L: ["x", "y"], + l: ["x", "y"], + M: ["x", "y"], + m: ["x", "y"], + Q: ["x1", "y1", "x", "y"], + q: ["x1", "y1", "x", "y"], + S: ["x2", "y2", "x", "y"], + s: ["x2", "y2", "x", "y"], + T: ["x", "y"], + t: ["x", "y"], + V: ["y"], + v: ["y"], + Z: [], + z: [], + }), + (this.COMMAND = 0), + (this.NUMBER = 1), + (this.EOD = 2), + (this.segments = []), + (this.d = t || ""), + this.parseData(t), + this.processPoints(); + } + loadFromSegments(t) { + (this.segments = t), this.processPoints(); + } + processPoints() { + let t = null, + e = [0, 0]; + for (let s, i = 0; i < this.segments.length; i++) { + switch (((s = this.segments[i]), s.key)) { + case "M": + case "L": + case "T": + s.point = [s.data[0], s.data[1]]; + break; + case "m": + case "l": + case "t": + s.point = [s.data[0] + e[0], s.data[1] + e[1]]; + break; + case "H": + s.point = [s.data[0], e[1]]; + break; + case "h": + s.point = [s.data[0] + e[0], e[1]]; + break; + case "V": + s.point = [e[0], s.data[0]]; + break; + case "v": + s.point = [e[0], s.data[0] + e[1]]; + break; + case "z": + case "Z": + t && (s.point = [t[0], t[1]]); + break; + case "C": + s.point = [s.data[4], s.data[5]]; + break; + case "c": + s.point = [s.data[4] + e[0], s.data[5] + e[1]]; + break; + case "S": + s.point = [s.data[2], s.data[3]]; + break; + case "s": + s.point = [s.data[2] + e[0], s.data[3] + e[1]]; + break; + case "Q": + s.point = [s.data[2], s.data[3]]; + break; + case "q": + s.point = [s.data[2] + e[0], s.data[3] + e[1]]; + break; + case "A": + s.point = [s.data[5], s.data[6]]; + break; + case "a": + s.point = [s.data[5] + e[0], s.data[6] + e[1]]; + } + ("m" === s.key || "M" === s.key) && (t = null), s.point && ((e = s.point), !t && (t = s.point)), ("z" === s.key || "Z" === s.key) && (t = null); + } + } + get closed() { + if (void 0 === this._closed) { + this._closed = !1; + for (let t of this.segments) "z" === t.key.toLowerCase() && (this._closed = !0); + } + return this._closed; + } + parseData(t) { + var e = this.tokenize(t), + s = 0, + i = e[s], + h = "BOD"; + for (this.segments = []; !i.isType(this.EOD); ) { + var a, + n = []; + if ("BOD" != h) i.isType(this.NUMBER) ? (a = this.PARAMS[h].length) : (s++, (a = this.PARAMS[i.text].length), (h = i.text)); + else { + if ("M" != i.text && "m" != i.text) return this.parseData("M0,0" + t); + s++, (a = this.PARAMS[i.text].length), (h = i.text); + } + if (s + a < e.length) { + for (var l, r = s; r < s + a; r++) { + if (((l = e[r]), !l.isType(this.NUMBER))) return void console.error("Parameter type is not a number: " + h + "," + l.text); + n[n.length] = l.text; + } + var o; + if (!this.PARAMS[h]) return void console.error("Unsupported segment type: " + h); + (o = { key: h, data: n }), this.segments.push(o), (s += a), (i = e[s]), "M" == h && (h = "L"), "m" == h && (h = "l"); + } else console.error("Path data ended before all parameters were found"); + } + } + tokenize(t) { + for (var e = []; "" != t; ) + if (t.match(/^([ \t\r\n,]+)/)) t = t.substr(RegExp.$1.length); + else if (t.match(/^([aAcChHlLmMqQsStTvVzZ])/)) (e[e.length] = new u(this.COMMAND, RegExp.$1)), (t = t.substr(RegExp.$1.length)); + else { + if (!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/)) return console.error("Unrecognized segment command: " + t), null; + (e[e.length] = new u(this.NUMBER, parseFloat(RegExp.$1))), (t = t.substr(RegExp.$1.length)); + } + return (e[e.length] = new u(this.EOD, null)), e; + } + } + class d { + constructor(t) { + (this.d = t), (this.parsed = new g(t)), (this._position = [0, 0]), (this.bezierReflectionPoint = null), (this.quadReflectionPoint = null), (this._first = null); + } + get segments() { + return this.parsed.segments; + } + get closed() { + return this.parsed.closed; + } + get linearPoints() { + if (!this._linearPoints) { + const t = []; + let e = []; + for (let s of this.parsed.segments) { + let i = s.key.toLowerCase(); + (("m" === i || "z" === i) && (e.length && (t.push(e), (e = [])), "z" === i)) || (s.point && e.push(s.point)); + } + e.length && (t.push(e), (e = [])), (this._linearPoints = t); + } + return this._linearPoints; + } + get first() { + return this._first; + } + set first(t) { + this._first = t; + } + setPosition(t, e) { + (this._position = [t, e]), this._first || (this._first = [t, e]); + } + get position() { + return this._position; + } + get x() { + return this._position[0]; + } + get y() { + return this._position[1]; + } + } + class _ { + constructor(t, e, s, l, r, c) { + const p = a / 180; + if (((this._segIndex = 0), (this._numSegs = 0), t[0] == e[0] && t[1] == e[1])) return; + (this._rx = o(s[0])), (this._ry = o(s[1])), (this._sinPhi = h(l * p)), (this._cosPhi = i(l * p)); + var f, + u = (this._cosPhi * (t[0] - e[0])) / 2 + (this._sinPhi * (t[1] - e[1])) / 2, + g = (-this._sinPhi * (t[0] - e[0])) / 2 + (this._cosPhi * (t[1] - e[1])) / 2, + d = this._rx * this._rx * this._ry * this._ry - this._rx * this._rx * g * g - this._ry * this._ry * u * u; + if (0 > d) { + let t = n(1 - d / (this._rx * this._rx * this._ry * this._ry)); + (this._rx = t), (this._ry = t), (f = 0); + } else f = (r == c ? -1 : 1) * n(d / (this._rx * this._rx * g * g + this._ry * this._ry * u * u)); + let _ = (f * this._rx * g) / this._ry, + y = (-f * this._ry * u) / this._rx; + (this._C = [0, 0]), + (this._C[0] = this._cosPhi * _ - this._sinPhi * y + (t[0] + e[0]) / 2), + (this._C[1] = this._sinPhi * _ + this._cosPhi * y + (t[1] + e[1]) / 2), + (this._theta = this.calculateVectorAngle(1, 0, (u - _) / this._rx, (g - y) / this._ry)); + let x = this.calculateVectorAngle((u - _) / this._rx, (g - y) / this._ry, (-u - _) / this._rx, (-g - y) / this._ry); + !c && 0 < x ? (x -= 2 * a) : c && 0 > x && (x += 2 * a), + (this._numSegs = Math.ceil(o(x / (a / 2)))), + (this._delta = x / this._numSegs), + (this._T = ((8 / 3) * h(this._delta / 4) * h(this._delta / 4)) / h(this._delta / 2)), + (this._from = t); + } + getNextSegment() { + var t, e, s; + if (this._segIndex == this._numSegs) return null; + let a = i(this._theta), + n = h(this._theta), + l = this._theta + this._delta, + r = i(l), + o = h(l); + return ( + (s = [this._cosPhi * this._rx * r - this._sinPhi * this._ry * o + this._C[0], this._sinPhi * this._rx * r + this._cosPhi * this._ry * o + this._C[1]]), + (t = [this._from[0] + this._T * (-this._cosPhi * this._rx * n - this._sinPhi * this._ry * a), this._from[1] + this._T * (-this._sinPhi * this._rx * n + this._cosPhi * this._ry * a)]), + (e = [s[0] + this._T * (this._cosPhi * this._rx * o + this._sinPhi * this._ry * r), s[1] + this._T * (this._sinPhi * this._rx * o - this._cosPhi * this._ry * r)]), + (this._theta = l), + (this._from = [s[0], s[1]]), + this._segIndex++, + { cp1: t, cp2: e, to: s } + ); + } + calculateVectorAngle(t, e, s, i) { + var h = Math.atan2; + let n = h(e, t), + l = h(i, s); + return l >= n ? l - n : 2 * a - (n - l); + } + } + class y { + constructor(t, e) { + (this.sets = t), (this.closed = e); + } + fit(t) { + let e = []; + for (const s of this.sets) { + let i = s.length, + h = Math.floor(t * i); + if (5 > h) { + if (5 >= i) continue; + h = 5; + } + e.push(this.reduce(s, h)); + } + let s = ""; + for (const t of e) { + for (let e, i = 0; i < t.length; i++) (e = t[i]), (s += 0 === i ? "M" + e[0] + "," + e[1] : "L" + e[0] + "," + e[1]); + this.closed && (s += "z "); + } + return s; + } + distance(t, e) { + return n(s(t[0] - e[0], 2) + s(t[1] - e[1], 2)); + } + reduce(t, e) { + if (t.length <= e) return t; + let s = t.slice(0); + for (; s.length > e; ) { + let t = -1, + e = -1; + for (let i = 1; i < s.length - 1; i++) { + let h = this.distance(s[i - 1], s[i]), + a = this.distance(s[i], s[i + 1]), + l = this.distance(s[i - 1], s[i + 1]), + r = (h + a + l) / 2, + o = n(r * (r - h) * (r - a) * (r - l)); + (0 > t || o < t) && ((t = o), (e = i)); + } + if (!(0 < e)) break; + s.splice(e, 1); + } + return s; + } + } + class x { + line(t, e, s, i, h) { + let a = this._doubleLine(t, e, s, i, h); + return { type: "path", ops: a }; + } + linearPath(t, e, s) { + const i = (t || []).length; + if (2 < i) { + let h = []; + for (let e = 0; e < i - 1; e++) h = h.concat(this._doubleLine(t[e][0], t[e][1], t[e + 1][0], t[e + 1][1], s)); + return e && (h = h.concat(this._doubleLine(t[i - 1][0], t[i - 1][1], t[0][0], t[0][1], s))), { type: "path", ops: h }; + } + return 2 === i ? this.line(t[0][0], t[0][1], t[1][0], t[1][1], s) : void 0; + } + polygon(t, e) { + return this.linearPath(t, !0, e); + } + rectangle(t, e, s, i, h) { + return this.polygon( + [ + [t, e], + [t + s, e], + [t + s, e + i], + [t, e + i], + ], + h + ); + } + curve(t, e) { + let s = this._curveWithOffset(t, 1 * (1 + 0.2 * e.roughness), e), + i = this._curveWithOffset(t, 1.5 * (1 + 0.22 * e.roughness), e); + return { type: "path", ops: s.concat(i) }; + } + ellipse(t, e, s, i, h) { + const n = (2 * a) / h.curveStepCount; + let l = o(s / 2), + r = o(i / 2); + (l += this._getOffset(0.05 * -l, 0.05 * l, h)), (r += this._getOffset(0.05 * -r, 0.05 * r, h)); + let c = this._ellipse(n, t, e, l, r, 1, n * this._getOffset(0.1, this._getOffset(0.4, 1, h), h), h), + p = this._ellipse(n, t, e, l, r, 1.5, 0, h); + return { type: "path", ops: c.concat(p) }; + } + arc(t, e, s, n, l, c, p, f, u) { + let g = t, + d = e, + _ = o(s / 2), + y = o(n / 2); + (_ += this._getOffset(0.01 * -_, 0.01 * _, u)), (y += this._getOffset(0.01 * -y, 0.01 * y, u)); + let x = l, + b = c; + for (; 0 > x; ) (x += 2 * a), (b += 2 * a); + b - x > 2 * a && ((x = 0), (b = 2 * a)); + let m = (2 * a) / u.curveStepCount, + w = r(m / 2, (b - x) / 2), + O = this._arc(w, g, d, _, y, x, b, 1, u), + S = this._arc(w, g, d, _, y, x, b, 1.5, u), + v = O.concat(S); + return ( + p && + (f + ? ((v = v.concat(this._doubleLine(g, d, g + _ * i(x), d + y * h(x), u))), (v = v.concat(this._doubleLine(g, d, g + _ * i(b), d + y * h(b), u)))) + : (v.push({ op: "lineTo", data: [g, d] }), v.push({ op: "lineTo", data: [g + _ * i(x), d + y * h(x)] }))), + { type: "path", ops: v } + ); + } + hachureFillArc(t, e, s, n, l, r, c) { + let p = t, + f = e, + u = o(s / 2), + g = o(n / 2); + (u += this._getOffset(0.01 * -u, 0.01 * u, c)), (g += this._getOffset(0.01 * -g, 0.01 * g, c)); + let d = l, + _ = r; + for (; 0 > d; ) (d += 2 * a), (_ += 2 * a); + _ - d > 2 * a && ((d = 0), (_ = 2 * a)); + let y = (_ - d) / c.curveStepCount, + x = [], + b = []; + for (let t = d; t <= _; t += y) x.push(p + u * i(t)), b.push(f + g * h(t)); + return x.push(p + u * i(_)), b.push(f + g * h(_)), x.push(p), b.push(f), this.hachureFillShape(x, b, c); + } + solidFillShape(t, e, s) { + let i = []; + if (t && e && t.length && e.length && t.length === e.length) { + let a = s.maxRandomnessOffset || 0; + const n = t.length; + if (2 < n) { + i.push({ op: "move", data: [t[0] + this._getOffset(-a, a, s), e[0] + this._getOffset(-a, a, s)] }); + for (var h = 1; h < n; h++) i.push({ op: "lineTo", data: [t[h] + this._getOffset(-a, a, s), e[h] + this._getOffset(-a, a, s)] }); + } + } + return { type: "fillPath", ops: i }; + } + hachureFillShape(t, s, n) { + let o = []; + if (t && s && t.length && s.length) { + let c = t[0], + p = t[0], + u = s[0], + g = s[0]; + for (let e = 1; e < t.length; e++) (c = r(c, t[e])), (p = l(p, t[e])), (u = r(u, s[e])), (g = l(g, s[e])); + const d = n.hachureAngle; + let _ = n.hachureGap; + 0 > _ && (_ = 4 * n.strokeWidth), (_ = l(_, 0.1)); + const y = (d % 180) * (a / 180), + x = i(y), + b = h(y), + m = e(y), + w = new f(u - 1, g + 1, c - 1, p + 1, _, b, x, m); + for (let e; null != (e = w.getNextLine()); ) { + let i = this._getIntersectingLines(e, t, s); + for (let t = 0; t < i.length; t++) + if (t < i.length - 1) { + let e = i[t], + s = i[t + 1]; + o = o.concat(this._doubleLine(e[0], e[1], s[0], s[1], n)); + } + } + } + return { type: "fillSketch", ops: o }; + } + hachureFillEllipse(t, s, i, h, l) { + let r = [], + c = o(i / 2), + p = o(h / 2); + (c += this._getOffset(0.05 * -c, 0.05 * c, l)), (p += this._getOffset(0.05 * -p, 0.05 * p, l)); + let f = l.hachureAngle, + u = l.hachureGap; + 0 >= u && (u = 4 * l.strokeWidth); + let g = l.fillWeight; + 0 > g && (g = l.strokeWidth / 2); + let d = e((f % 180) * (a / 180)), + _ = p / c, + y = n(_ * d * _ * d + 1), + x = (_ * d) / y, + b = 1 / y, + m = u / ((c * p) / n(p * b * (p * b) + c * x * (c * x)) / c), + w = n(c * c - (t - c + m) * (t - c + m)); + for (var O = t - c + m; O < t + c; O += m) { + w = n(c * c - (t - O) * (t - O)); + let e = this._affine(O, s - w, t, s, x, b, _), + i = this._affine(O, s + w, t, s, x, b, _); + r = r.concat(this._doubleLine(e[0], e[1], i[0], i[1], l)); + } + return { type: "fillSketch", ops: r }; + } + svgPath(t, e) { + t = (t || "").replace(/\n/g, " ").replace(/(-)/g, " -").replace(/(-\s)/g, "-").replace("/(ss)/g", " "); + let s = new d(t); + if (e.simplification) { + let t = new y(s.linearPoints, s.closed), + i = t.fit(e.simplification); + s = new d(i); + } + let i = [], + h = s.segments || []; + for (let t = 0; t < h.length; t++) { + let a = h[t], + n = 0 < t ? h[t - 1] : null, + l = this._processSegment(s, a, n, e); + l && l.length && (i = i.concat(l)); + } + return { type: "path", ops: i }; + } + _bezierTo(t, e, s, i, h, a, n, l) { + let r = [], + o = [l.maxRandomnessOffset || 1, (l.maxRandomnessOffset || 1) + 0.5], + c = null; + for (let p = 0; 2 > p; p++) + 0 === p ? r.push({ op: "move", data: [n.x, n.y] }) : r.push({ op: "move", data: [n.x + this._getOffset(-o[0], o[0], l), n.y + this._getOffset(-o[0], o[0], l)] }), + (c = [h + this._getOffset(-o[p], o[p], l), a + this._getOffset(-o[p], o[p], l)]), + r.push({ op: "bcurveTo", data: [t + this._getOffset(-o[p], o[p], l), e + this._getOffset(-o[p], o[p], l), s + this._getOffset(-o[p], o[p], l), i + this._getOffset(-o[p], o[p], l), c[0], c[1]] }); + return n.setPosition(c[0], c[1]), r; + } + _processSegment(t, e, s, i) { + let h = []; + switch (e.key) { + case "M": + case "m": { + let s = "m" === e.key; + if (2 <= e.data.length) { + let a = +e.data[0], + n = +e.data[1]; + s && ((a += t.x), (n += t.y)); + let l = 1 * (i.maxRandomnessOffset || 0); + (a += this._getOffset(-l, l, i)), (n += this._getOffset(-l, l, i)), t.setPosition(a, n), h.push({ op: "move", data: [a, n] }); + } + break; + } + case "L": + case "l": { + let s = "l" === e.key; + if (2 <= e.data.length) { + let a = +e.data[0], + n = +e.data[1]; + s && ((a += t.x), (n += t.y)), (h = h.concat(this._doubleLine(t.x, t.y, a, n, i))), t.setPosition(a, n); + } + break; + } + case "H": + case "h": { + const s = "h" === e.key; + if (e.data.length) { + let a = +e.data[0]; + s && (a += t.x), (h = h.concat(this._doubleLine(t.x, t.y, a, t.y, i))), t.setPosition(a, t.y); + } + break; + } + case "V": + case "v": { + const s = "v" === e.key; + if (e.data.length) { + let a = +e.data[0]; + s && (a += t.y), (h = h.concat(this._doubleLine(t.x, t.y, t.x, a, i))), t.setPosition(t.x, a); + } + break; + } + case "Z": + case "z": + t.first && ((h = h.concat(this._doubleLine(t.x, t.y, t.first[0], t.first[1], i))), t.setPosition(t.first[0], t.first[1]), (t.first = null)); + break; + case "C": + case "c": { + const s = "c" === e.key; + if (6 <= e.data.length) { + let a = +e.data[0], + n = +e.data[1], + l = +e.data[2], + r = +e.data[3], + o = +e.data[4], + c = +e.data[5]; + s && ((a += t.x), (l += t.x), (o += t.x), (n += t.y), (r += t.y), (c += t.y)); + let p = this._bezierTo(a, n, l, r, o, c, t, i); + (h = h.concat(p)), (t.bezierReflectionPoint = [o + (o - l), c + (c - r)]); + } + break; + } + case "S": + case "s": { + const n = "s" === e.key; + if (4 <= e.data.length) { + let l = +e.data[0], + r = +e.data[1], + o = +e.data[2], + c = +e.data[3]; + n && ((l += t.x), (o += t.x), (r += t.y), (c += t.y)); + let p = l, + f = r, + u = s ? s.key : ""; + var a = null; + ("c" == u || "C" == u || "s" == u || "S" == u) && (a = t.bezierReflectionPoint), a && ((p = a[0]), (f = a[1])); + let g = this._bezierTo(p, f, l, r, o, c, t, i); + (h = h.concat(g)), (t.bezierReflectionPoint = [o + (o - l), c + (c - r)]); + } + break; + } + case "Q": + case "q": { + const s = "q" === e.key; + if (4 <= e.data.length) { + let a = +e.data[0], + n = +e.data[1], + l = +e.data[2], + r = +e.data[3]; + s && ((a += t.x), (l += t.x), (n += t.y), (r += t.y)); + let o = 1 * (1 + 0.2 * i.roughness), + c = 1.5 * (1 + 0.22 * i.roughness); + h.push({ op: "move", data: [t.x + this._getOffset(-o, o, i), t.y + this._getOffset(-o, o, i)] }); + let p = [l + this._getOffset(-o, o, i), r + this._getOffset(-o, o, i)]; + h.push({ op: "qcurveTo", data: [a + this._getOffset(-o, o, i), n + this._getOffset(-o, o, i), p[0], p[1]] }), + h.push({ op: "move", data: [t.x + this._getOffset(-c, c, i), t.y + this._getOffset(-c, c, i)] }), + (p = [l + this._getOffset(-c, c, i), r + this._getOffset(-c, c, i)]), + h.push({ op: "qcurveTo", data: [a + this._getOffset(-c, c, i), n + this._getOffset(-c, c, i), p[0], p[1]] }), + t.setPosition(p[0], p[1]), + (t.quadReflectionPoint = [l + (l - a), r + (r - n)]); + } + break; + } + case "T": + case "t": { + const n = "t" === e.key; + if (2 <= e.data.length) { + let l = +e.data[0], + r = +e.data[1]; + n && ((l += t.x), (r += t.y)); + let o = l, + c = r, + p = s ? s.key : ""; + (a = null), ("q" == p || "Q" == p || "t" == p || "T" == p) && (a = t.quadReflectionPoint), a && ((o = a[0]), (c = a[1])); + let f = 1 * (1 + 0.2 * i.roughness), + u = 1.5 * (1 + 0.22 * i.roughness); + h.push({ op: "move", data: [t.x + this._getOffset(-f, f, i), t.y + this._getOffset(-f, f, i)] }); + let g = [l + this._getOffset(-f, f, i), r + this._getOffset(-f, f, i)]; + h.push({ op: "qcurveTo", data: [o + this._getOffset(-f, f, i), c + this._getOffset(-f, f, i), g[0], g[1]] }), + h.push({ op: "move", data: [t.x + this._getOffset(-u, u, i), t.y + this._getOffset(-u, u, i)] }), + (g = [l + this._getOffset(-u, u, i), r + this._getOffset(-u, u, i)]), + h.push({ op: "qcurveTo", data: [o + this._getOffset(-u, u, i), c + this._getOffset(-u, u, i), g[0], g[1]] }), + t.setPosition(g[0], g[1]), + (t.quadReflectionPoint = [l + (l - o), r + (r - c)]); + } + break; + } + case "A": + case "a": { + const s = "a" === e.key; + if (7 <= e.data.length) { + let a = +e.data[0], + n = +e.data[1], + l = +e.data[2], + r = +e.data[3], + o = +e.data[4], + c = +e.data[5], + p = +e.data[6]; + if ((s && ((c += t.x), (p += t.y)), c == t.x && p == t.y)) break; + if (0 == a || 0 == n) (h = h.concat(this._doubleLine(t.x, t.y, c, p, i))), t.setPosition(c, p); + else { + i.maxRandomnessOffset; + for (let e = 0; 1 > e; e++) { + let e = new _([t.x, t.y], [c, p], [a, n], l, !!r, !!o), + s = e.getNextSegment(); + for (; s; ) { + let a = this._bezierTo(s.cp1[0], s.cp1[1], s.cp2[0], s.cp2[1], s.to[0], s.to[1], t, i); + (h = h.concat(a)), (s = e.getNextSegment()); + } + } + } + } + break; + } + } + return h; + } + _getOffset(t, e, s) { + return s.roughness * (Math.random() * (e - t) + t); + } + _affine(t, e, s, i, h, a, n) { + return [-s * a - i * h + s + a * t + h * e, n * (s * h - i * a) + i + -n * h * t + n * a * e]; + } + _doubleLine(t, e, s, i, h) { + const a = this._line(t, e, s, i, h, !0, !1), + n = this._line(t, e, s, i, h, !0, !0); + return a.concat(n); + } + _line(t, e, i, h, a, l, r) { + const o = s(t - i, 2) + s(e - h, 2); + let c = a.maxRandomnessOffset || 0; + c * c * 100 > o && (c = n(o) / 10); + const p = c / 2, + f = 0.2 + 0.2 * Math.random(); + let u = (a.bowing * a.maxRandomnessOffset * (h - e)) / 200, + g = (a.bowing * a.maxRandomnessOffset * (t - i)) / 200; + (u = this._getOffset(-u, u, a)), (g = this._getOffset(-g, g, a)); + let d = []; + return ( + l && (r ? d.push({ op: "move", data: [t + this._getOffset(-p, p, a), e + this._getOffset(-p, p, a)] }) : d.push({ op: "move", data: [t + this._getOffset(-c, c, a), e + this._getOffset(-c, c, a)] })), + r + ? d.push({ + op: "bcurveTo", + data: [ + u + t + (i - t) * f + this._getOffset(-p, p, a), + g + e + (h - e) * f + this._getOffset(-p, p, a), + u + t + 2 * (i - t) * f + this._getOffset(-p, p, a), + g + e + 2 * (h - e) * f + this._getOffset(-p, p, a), + i + this._getOffset(-p, p, a), + h + this._getOffset(-p, p, a), + ], + }) + : d.push({ + op: "bcurveTo", + data: [ + u + t + (i - t) * f + this._getOffset(-c, c, a), + g + e + (h - e) * f + this._getOffset(-c, c, a), + u + t + 2 * (i - t) * f + this._getOffset(-c, c, a), + g + e + 2 * (h - e) * f + this._getOffset(-c, c, a), + i + this._getOffset(-c, c, a), + h + this._getOffset(-c, c, a), + ], + }), + d + ); + } + _curve(t, e, s) { + const i = t.length; + let h = []; + if (3 < i) { + const a = [], + n = 1 - s.curveTightness; + h.push({ op: "move", data: [t[1][0], t[1][1]] }); + for (let e = 1; e + 2 < i; e++) { + const s = t[e]; + (a[0] = [s[0], s[1]]), + (a[1] = [s[0] + (n * t[e + 1][0] - n * t[e - 1][0]) / 6, s[1] + (n * t[e + 1][1] - n * t[e - 1][1]) / 6]), + (a[2] = [t[e + 1][0] + (n * t[e][0] - n * t[e + 2][0]) / 6, t[e + 1][1] + (n * t[e][1] - n * t[e + 2][1]) / 6]), + (a[3] = [t[e + 1][0], t[e + 1][1]]), + h.push({ op: "bcurveTo", data: [a[1][0], a[1][1], a[2][0], a[2][1], a[3][0], a[3][1]] }); + } + if (e && 2 === e.length) { + let t = s.maxRandomnessOffset; + h.push({ ops: "lineTo", data: [e[0] + this._getOffset(-t, t, s), e[1] + +this._getOffset(-t, t, s)] }); + } + } else + 3 === i + ? (h.push({ op: "move", data: [t[1][0], t[1][1]] }), h.push({ op: "bcurveTo", data: [t[1][0], t[1][1], t[2][0], t[2][1], t[2][0], t[2][1]] })) + : 2 === i && (h = h.concat(this._doubleLine(t[0][0], t[0][1], t[1][0], t[1][1], s))); + return h; + } + _ellipse(t, e, s, n, l, r, o, c) { + const p = this._getOffset(-0.5, 0.5, c) - a / 2, + f = []; + f.push([this._getOffset(-r, r, c) + e + 0.9 * n * i(p - t), this._getOffset(-r, r, c) + s + 0.9 * l * h(p - t)]); + for (let o = p; o < 2 * a + p - 0.01; o += t) f.push([this._getOffset(-r, r, c) + e + n * i(o), this._getOffset(-r, r, c) + s + l * h(o)]); + return ( + f.push([this._getOffset(-r, r, c) + e + n * i(p + 2 * a + 0.5 * o), this._getOffset(-r, r, c) + s + l * h(p + 2 * a + 0.5 * o)]), + f.push([this._getOffset(-r, r, c) + e + 0.98 * n * i(p + o), this._getOffset(-r, r, c) + s + 0.98 * l * h(p + o)]), + f.push([this._getOffset(-r, r, c) + e + 0.9 * n * i(p + 0.5 * o), this._getOffset(-r, r, c) + s + 0.9 * l * h(p + 0.5 * o)]), + this._curve(f, null, c) + ); + } + _curveWithOffset(t, e, s) { + const i = [ + [t[0][0] + this._getOffset(-e, e, s), t[0][1] + this._getOffset(-e, e, s)], + [t[0][0] + this._getOffset(-e, e, s), t[0][1] + this._getOffset(-e, e, s)], + ]; + for (let h = 1; h < t.length; h++) + i.push([t[h][0] + this._getOffset(-e, e, s), t[h][1] + this._getOffset(-e, e, s)]), h === t.length - 1 && i.push([t[h][0] + this._getOffset(-e, e, s), t[h][1] + this._getOffset(-e, e, s)]); + return this._curve(i, null, s); + } + _arc(t, e, s, a, n, l, r, o, c) { + const p = l + this._getOffset(-0.1, 0.1, c), + f = []; + f.push([this._getOffset(-o, o, c) + e + 0.9 * a * i(p - t), this._getOffset(-o, o, c) + s + 0.9 * n * h(p - t)]); + for (let l = p; l <= r; l += t) f.push([this._getOffset(-o, o, c) + e + a * i(l), this._getOffset(-o, o, c) + s + n * h(l)]); + return f.push([e + a * i(r), s + n * h(r)]), f.push([e + a * i(r), s + n * h(r)]), this._curve(f, null, c); + } + _getIntersectingLines(e, s, i) { + let h = []; + for (var a = new p(e[0], e[1], e[2], e[3]), n = 0; n < s.length; n++) { + let e = new p(s[n], i[n], s[(n + 1) % s.length], i[(n + 1) % s.length]); + a.compare(e) == t().INTERSECTS && h.push([a.xi, a.yi]); + } + return h; + } + } + self._roughScript = self.document && self.document.currentScript && self.document.currentScript.src; + class b { + constructor(t, e) { + (this.config = t || {}), + (this.canvas = e), + (this.defaultOptions = { + maxRandomnessOffset: 2, + roughness: 1, + bowing: 1, + stroke: "#000", + strokeWidth: 1, + curveTightness: 0, + curveStepCount: 9, + fill: null, + fillStyle: "hachure", + fillWeight: -1, + hachureAngle: -41, + hachureGap: -1, + }), + this.config.options && (this.defaultOptions = this._options(this.config.options)); + } + _options(t) { + return t ? Object.assign({}, this.defaultOptions, t) : this.defaultOptions; + } + _drawable(t, e, s) { + return { shape: t, sets: e || [], options: s || this.defaultOptions }; + } + get lib() { + if (!this._renderer) + if (self && self.workly && this.config.async && !this.config.noWorker) { + Function.prototype.toString; + const t = this.config.worklyURL || "https://fastly.jsdelivr.net/gh/pshihn/workly/dist/workly.min.js", + e = this.config.roughURL || self._roughScript; + if (e && t) { + let s = `importScripts('${t}','${e}');\nworkly.expose(self.rough.createRenderer());`, + i = URL.createObjectURL(new Blob([s])); + this._renderer = workly.proxy(i); + } else this._renderer = new x(); + } else this._renderer = new x(); + return this._renderer; + } + line(t, e, s, i, h) { + const a = this._options(h); + return this._drawable("line", [this.lib.line(t, e, s, i, a)], a); + } + rectangle(t, e, s, i, h) { + const a = this._options(h), + n = []; + if (a.fill) { + const h = [t, t + s, t + s, t], + l = [e, e, e + i, e + i]; + "solid" === a.fillStyle ? n.push(this.lib.solidFillShape(h, l, a)) : n.push(this.lib.hachureFillShape(h, l, a)); + } + return n.push(this.lib.rectangle(t, e, s, i, a)), this._drawable("rectangle", n, a); + } + ellipse(t, e, s, i, h) { + const a = this._options(h), + n = []; + if (a.fill) + if ("solid" === a.fillStyle) { + const h = this.lib.ellipse(t, e, s, i, a); + (h.type = "fillPath"), n.push(h); + } else n.push(this.lib.hachureFillEllipse(t, e, s, i, a)); + return n.push(this.lib.ellipse(t, e, s, i, a)), this._drawable("ellipse", n, a); + } + circle(t, e, s, i) { + let h = this.ellipse(t, e, s, s, i); + return (h.shape = "circle"), h; + } + linearPath(t, e) { + const s = this._options(e); + return this._drawable("linearPath", [this.lib.linearPath(t, !1, s)], s); + } + polygon(t, e) { + const s = this._options(e), + i = []; + if (s.fill) { + let e = [], + h = []; + for (let s of t) e.push(s[0]), h.push(s[1]); + "solid" === s.fillStyle ? i.push(this.lib.solidFillShape(e, h, s)) : i.push(this.lib.hachureFillShape(e, h, s)); + } + return i.push(this.lib.linearPath(t, !0, s)), this._drawable("polygon", i, s); + } + arc(t, e, s, i, h, a, n, l) { + const r = this._options(l), + o = []; + if (n && r.fill) + if ("solid" === r.fillStyle) { + let n = this.lib.arc(t, e, s, i, h, a, !0, !1, r); + (n.type = "fillPath"), o.push(n); + } else o.push(this.lib.hachureFillArc(t, e, s, i, h, a, r)); + return o.push(this.lib.arc(t, e, s, i, h, a, n, !0, r)), this._drawable("arc", o, r); + } + curve(t, e) { + const s = this._options(e); + return this._drawable("curve", [this.lib.curve(t, s)], s); + } + path(t, e) { + const s = this._options(e), + i = []; + if (!t) return this._drawable("path", i, s); + if (s.fill) + if ("solid" === s.fillStyle) i.push({ type: "path2Dfill", path: t }); + else { + const e = this._computePathSize(t); + let h = [0, e[0], e[0], 0], + a = [0, 0, e[1], e[1]], + n = this.lib.hachureFillShape(h, a, s); + (n.type = "path2Dpattern"), (n.size = e), (n.path = t), i.push(n); + } + return i.push(this.lib.svgPath(t, s)), this._drawable("path", i, s); + } + _computePathSize(t) { + let e = [0, 0]; + if (self.document) + try { + const s = "http://www.w3.org/2000/svg"; + let i = self.document.createElementNS(s, "svg"); + i.setAttribute("width", "0"), i.setAttribute("height", "0"); + let h = self.document.createElementNS(s, "path"); + h.setAttribute("d", t), i.appendChild(h), self.document.body.appendChild(i); + let a = h.getBBox(); + a && ((e[0] = a.width || 0), (e[1] = a.height || 0)), self.document.body.removeChild(i); + } catch (t) {} + return e[0] * e[1] || (e = [this.canvas.width || 100, this.canvas.height || 100]), (e[0] = r(4 * e[0], this.canvas.width)), (e[1] = r(4 * e[1], this.canvas.height)), e; + } + } + class m extends b { + async line(t, e, s, i, h) { + const a = this._options(h); + return this._drawable("line", [await this.lib.line(t, e, s, i, a)], a); + } + async rectangle(t, e, s, i, h) { + const a = this._options(h), + n = []; + if (a.fill) { + const h = [t, t + s, t + s, t], + l = [e, e, e + i, e + i]; + "solid" === a.fillStyle ? n.push(await this.lib.solidFillShape(h, l, a)) : n.push(await this.lib.hachureFillShape(h, l, a)); + } + return n.push(await this.lib.rectangle(t, e, s, i, a)), this._drawable("rectangle", n, a); + } + async ellipse(t, e, s, i, h) { + const a = this._options(h), + n = []; + if (a.fill) + if ("solid" === a.fillStyle) { + const h = await this.lib.ellipse(t, e, s, i, a); + (h.type = "fillPath"), n.push(h); + } else n.push(await this.lib.hachureFillEllipse(t, e, s, i, a)); + return n.push(await this.lib.ellipse(t, e, s, i, a)), this._drawable("ellipse", n, a); + } + async circle(t, e, s, i) { + let h = await this.ellipse(t, e, s, s, i); + return (h.shape = "circle"), h; + } + async linearPath(t, e) { + const s = this._options(e); + return this._drawable("linearPath", [await this.lib.linearPath(t, !1, s)], s); + } + async polygon(t, e) { + const s = this._options(e), + i = []; + if (s.fill) { + let e = [], + h = []; + for (let s of t) e.push(s[0]), h.push(s[1]); + "solid" === s.fillStyle ? i.push(await this.lib.solidFillShape(e, h, s)) : i.push(await this.lib.hachureFillShape(e, h, s)); + } + return i.push(await this.lib.linearPath(t, !0, s)), this._drawable("polygon", i, s); + } + async arc(t, e, s, i, h, a, n, l) { + const r = this._options(l), + o = []; + if (n && r.fill) + if ("solid" === r.fillStyle) { + let n = await this.lib.arc(t, e, s, i, h, a, !0, !1, r); + (n.type = "fillPath"), o.push(n); + } else o.push(await this.lib.hachureFillArc(t, e, s, i, h, a, r)); + return o.push(await this.lib.arc(t, e, s, i, h, a, n, !0, r)), this._drawable("arc", o, r); + } + async curve(t, e) { + const s = this._options(e); + return this._drawable("curve", [await this.lib.curve(t, s)], s); + } + async path(t, e) { + const s = this._options(e), + i = []; + if (!t) return this._drawable("path", i, s); + if (s.fill) + if ("solid" === s.fillStyle) i.push({ type: "path2Dfill", path: t }); + else { + const e = this._computePathSize(t); + let h = [0, e[0], e[0], 0], + a = [0, 0, e[1], e[1]], + n = await this.lib.hachureFillShape(h, a, s); + (n.type = "path2Dpattern"), (n.size = e), (n.path = t), i.push(n); + } + return i.push(await this.lib.svgPath(t, s)), this._drawable("path", i, s); + } + } + class w { + constructor(t, e) { + (this.canvas = t), (this.ctx = this.canvas.getContext("2d")), this._init(e); + } + _init(t) { + this.gen = new b(t, this.canvas); + } + get generator() { + return this.gen; + } + static createRenderer() { + return new x(); + } + line(t, e, s, i, h) { + let a = this.gen.line(t, e, s, i, h); + return this.draw(a), a; + } + rectangle(t, e, s, i, h) { + let a = this.gen.rectangle(t, e, s, i, h); + return this.draw(a), a; + } + ellipse(t, e, s, i, h) { + let a = this.gen.ellipse(t, e, s, i, h); + return this.draw(a), a; + } + circle(t, e, s, i) { + let h = this.gen.circle(t, e, s, i); + return this.draw(h), h; + } + linearPath(t, e) { + let s = this.gen.linearPath(t, e); + return this.draw(s), s; + } + polygon(t, e) { + let s = this.gen.polygon(t, e); + return this.draw(s), s; + } + arc(t, e, s, i, h, a, n, l) { + let r = this.gen.arc(t, e, s, i, h, a, n, l); + return this.draw(r), r; + } + curve(t, e) { + let s = this.gen.curve(t, e); + return this.draw(s), s; + } + path(t, e) { + let s = this.gen.path(t, e); + return this.draw(s), s; + } + draw(t) { + let e = t.sets || [], + s = t.options || this.gen.defaultOptions, + i = this.ctx; + for (let t of e) + switch (t.type) { + case "path": + i.save(), (i.strokeStyle = s.stroke), (i.lineWidth = s.strokeWidth), this._drawToContext(i, t), i.restore(); + break; + case "fillPath": + i.save(), (i.fillStyle = s.fill), this._drawToContext(i, t, s), i.restore(); + break; + case "fillSketch": + this._fillSketch(i, t, s); + break; + case "path2Dfill": { + this.ctx.save(), (this.ctx.fillStyle = s.fill); + let e = new Path2D(t.path); + this.ctx.fill(e), this.ctx.restore(); + break; + } + case "path2Dpattern": { + let e = t.size, + i = document.createElement("canvas"); + (i.width = e[0]), (i.height = e[1]), this._fillSketch(i.getContext("2d"), t, s), this.ctx.save(), (this.ctx.fillStyle = this.ctx.createPattern(i, "repeat")); + let h = new Path2D(t.path); + this.ctx.fill(h), this.ctx.restore(); + break; + } + } + } + _fillSketch(t, e, s) { + let i = s.fillWeight; + 0 > i && (i = s.strokeWidth / 2), t.save(), (t.strokeStyle = s.fill), (t.lineWidth = i), this._drawToContext(t, e), t.restore(); + } + _drawToContext(t, e) { + t.beginPath(); + for (let s of e.ops) { + const e = s.data; + switch (s.op) { + case "move": + t.moveTo(e[0], e[1]); + break; + case "bcurveTo": + t.bezierCurveTo(e[0], e[1], e[2], e[3], e[4], e[5]); + break; + case "qcurveTo": + t.quadraticCurveTo(e[0], e[1], e[2], e[3]); + break; + case "lineTo": + t.lineTo(e[0], e[1]); + } + } + "fillPath" === e.type ? t.fill() : t.stroke(); + } + } + class O extends w { + _init(t) { + this.gen = new m(t, this.canvas); + } + async line(t, e, s, i, h) { + let a = await this.gen.line(t, e, s, i, h); + return this.draw(a), a; + } + async rectangle(t, e, s, i, h) { + let a = await this.gen.rectangle(t, e, s, i, h); + return this.draw(a), a; + } + async ellipse(t, e, s, i, h) { + let a = await this.gen.ellipse(t, e, s, i, h); + return this.draw(a), a; + } + async circle(t, e, s, i) { + let h = await this.gen.circle(t, e, s, i); + return this.draw(h), h; + } + async linearPath(t, e) { + let s = await this.gen.linearPath(t, e); + return this.draw(s), s; + } + async polygon(t, e) { + let s = await this.gen.polygon(t, e); + return this.draw(s), s; + } + async arc(t, e, s, i, h, a, n, l) { + let r = await this.gen.arc(t, e, s, i, h, a, n, l); + return this.draw(r), r; + } + async curve(t, e) { + let s = await this.gen.curve(t, e); + return this.draw(s), s; + } + async path(t, e) { + let s = await this.gen.path(t, e); + return this.draw(s), s; + } + } + var S = { canvas: (t, e) => (e && e.async ? new O(t, e) : new w(t, e)), createRenderer: () => w.createRenderer(), generator: (t, e) => (t && t.async ? new m(t, e) : new b(t, e)) }; + return S; + })(), + e = function (t) { + for (var e = arguments.length, s = Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++) s[i - 1] = arguments[i]; + return Object.assign.apply(Object, [{}, t].concat(s)); + }, + s = function (t) { + var e = t.h, + s = t.s, + i = t.l, + h = t.a; + return "hsla(" + e + "," + s + "%," + i + "%," + h + ")"; + }, + i = e.bind(null, { h: 0, s: 100, l: 100, a: 1 }), + h = e.bind(null, { x: 0, y: 0 }), + a = e.bind(null, { pos: h(), vel: h(), angle: 0, speed: 0, radius: 0, rotation: 0, color: i() }), + n = [i({ h: 20, s: 100, l: 50 }), i({ h: 200, l: 50 }), i({ h: 300, l: 50 }), i({ h: 100, l: 40 })], + l = function e(i) { + i.animation && i.animation(e.bind(null, i)); + var h = i.ctx, + a = h.canvas, + n = t.canvas(a); + h.clearRect(0, 0, a.width, a.height), + i.particles.map(function (t, e) { + (t.pos.y -= t.speed), + (t.pos.x = e % 2 ? t.pos.x + 0.2 * Math.sin(t.angle) : t.pos.x - 0.2 * Math.cos(t.angle)), + (t.angle += 0.01), + n.circle(t.pos.x, t.pos.y, t.radius, { fill: s(t.color), roughness: 1.5 * Math.random(), hachureGap: t.hachureGap, hachureAngle: t.hachureAngle }), + n.line(t.pos.x, t.pos.y + 1.2 * t.radius, t.pos.x, t.pos.y + t.radius / 2, { bowing: 3 * Math.random() }), + t.pos.y + 3 * t.radius < 0 && ((t.pos.y = a.height + 3 * t.radius), (t.pos.x = Math.random() * (a.width - t.radius))); + }); + }, + r = { animation: requestAnimationFrame.bind(null), ctx: document.createElement("canvas").getContext("2d"), title: "Brian Douglas", rotation: 0, particles: [] }; + !(function (t) { + var e = t.ctx.canvas; + e.setAttribute("style", "pointer-events:none;position:fixed;z-index:-510;left:0;top:0;right:0;bottom:0;"), (e.width = window.innerWidth), (e.height = window.innerHeight), document.body.appendChild(e); + for (var s = 50; s--; ) + t.particles.push( + a({ + pos: { x: Math.random() * e.width, y: Math.random() * e.height }, + speed: Math.random() + 0.2, + radius: 60 * Math.random() + 20, + color: n[Math.floor(Math.random() * n.length)], + hachureAngle: 90 * Math.random(), + hachureGap: 8 * Math.random() + 1, + }) + ); + l(t); + })(r), + /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) || + window.addEventListener("resize", function () { + (r.ctx.canvas.width = window.innerWidth), (r.ctx.canvas.height = window.innerHeight); + }); +})(); diff --git a/assets/js/joe.global.js b/assets/js/joe.global.js index 38bd01d..65cddc5 100644 --- a/assets/js/joe.global.js +++ b/assets/js/joe.global.js @@ -1,124 +1,124 @@ -document.addEventListener('DOMContentLoaded', () => { - /* 初始化昼夜模式 */ - { - if (localStorage.getItem('data-night')) { - $('.joe_action_item.mode .icon-1').addClass('active'); - $('.joe_action_item.mode .icon-2').removeClass('active'); - } else { - $('html').removeAttr('data-night'); - $('.joe_action_item.mode .icon-1').removeClass('active'); - $('.joe_action_item.mode .icon-2').addClass('active'); - } - $('.joe_action_item.mode').on('click', () => { - if (localStorage.getItem('data-night')) { - $('.joe_action_item.mode .icon-1').removeClass('active'); - $('.joe_action_item.mode .icon-2').addClass('active'); - $('html').removeAttr('data-night'); - localStorage.removeItem('data-night'); - } else { - $('.joe_action_item.mode .icon-1').addClass('active'); - $('.joe_action_item.mode .icon-2').removeClass('active'); - $('html').attr('data-night', 'night'); - localStorage.setItem('data-night', 'night'); - } - }); - } +document.addEventListener("DOMContentLoaded", () => { + /* 初始化昼夜模式 */ + { + if (localStorage.getItem("data-night")) { + $(".joe_action_item.mode .icon-1").addClass("active"); + $(".joe_action_item.mode .icon-2").removeClass("active"); + } else { + $("html").removeAttr("data-night"); + $(".joe_action_item.mode .icon-1").removeClass("active"); + $(".joe_action_item.mode .icon-2").addClass("active"); + } + $(".joe_action_item.mode").on("click", () => { + if (localStorage.getItem("data-night")) { + $(".joe_action_item.mode .icon-1").removeClass("active"); + $(".joe_action_item.mode .icon-2").addClass("active"); + $("html").removeAttr("data-night"); + localStorage.removeItem("data-night"); + } else { + $(".joe_action_item.mode .icon-1").addClass("active"); + $(".joe_action_item.mode .icon-2").removeClass("active"); + $("html").attr("data-night", "night"); + localStorage.setItem("data-night", "night"); + } + }); + } - /* 动态背景 */ - { - if (!Joe.IS_MOBILE && Joe.DYNAMIC_BACKGROUND !== 'off' && Joe.DYNAMIC_BACKGROUND && !Joe.WALLPAPER_BACKGROUND_PC) { - $.getScript(window.Joe.THEME_URL + `assets/backdrop/${Joe.DYNAMIC_BACKGROUND}`); - } - } + /* 动态背景 */ + { + if (!Joe.IS_MOBILE && Joe.DYNAMIC_BACKGROUND !== "off" && Joe.DYNAMIC_BACKGROUND && !Joe.WALLPAPER_BACKGROUND_PC) { + $.getScript(window.Joe.THEME_URL + `assets/backdrop/${Joe.DYNAMIC_BACKGROUND}`); + } + } - /* 搜索框弹窗 */ - { - $('.joe_header__above-search .input').on('click', e => { - e.stopPropagation(); - $('.joe_header__above-search .result').addClass('active'); - }); - $(document).on('click', function () { - $('.joe_header__above-search .result').removeClass('active'); - }); - } + /* 搜索框弹窗 */ + { + $(".joe_header__above-search .input").on("click", (e) => { + e.stopPropagation(); + $(".joe_header__above-search .result").addClass("active"); + }); + $(document).on("click", function () { + $(".joe_header__above-search .result").removeClass("active"); + }); + } - /* 激活全局下拉框功能 */ - { - $('.joe_dropdown').each(function (index, item) { - const menu = $(this).find('.joe_dropdown__menu'); - const trigger = $(item).attr('trigger') || 'click'; - const placement = $(item).attr('placement') || $(this).height() || 0; - menu.css('top', placement); - if (trigger === 'hover') { - $(this).hover( - () => $(this).addClass('active'), - () => $(this).removeClass('active') - ); - } else { - $(this).on('click', function (e) { - $(this).toggleClass('active'); - $(document).one('click', () => $(this).removeClass('active')); - e.stopPropagation(); - }); - menu.on('click', e => e.stopPropagation()); - } - }); - } + /* 激活全局下拉框功能 */ + { + $(".joe_dropdown").each(function (index, item) { + const menu = $(this).find(".joe_dropdown__menu"); + const trigger = $(item).attr("trigger") || "click"; + const placement = $(item).attr("placement") || $(this).height() || 0; + menu.css("top", placement); + if (trigger === "hover") { + $(this).hover( + () => $(this).addClass("active"), + () => $(this).removeClass("active") + ); + } else { + $(this).on("click", function (e) { + $(this).toggleClass("active"); + $(document).one("click", () => $(this).removeClass("active")); + e.stopPropagation(); + }); + menu.on("click", (e) => e.stopPropagation()); + } + }); + } - /* 激活全局返回顶部功能 */ - { - let _debounce = null; - const handleScroll = () => ((document.documentElement.scrollTop || document.body.scrollTop) > 300 ? $('.joe_action_item.scroll').addClass('active') : $('.joe_action_item.scroll').removeClass('active')); - handleScroll(); - $(document).on('scroll', () => { - clearTimeout(_debounce); - _debounce = setTimeout(handleScroll, 80); - }); - $('.joe_action_item.scroll').on('click', () => window.scrollTo({ top: 0, behavior: 'smooth' })); - } + /* 激活全局返回顶部功能 */ + { + let _debounce = null; + const handleScroll = () => ((document.documentElement.scrollTop || document.body.scrollTop) > 300 ? $(".joe_action_item.scroll").addClass("active") : $(".joe_action_item.scroll").removeClass("active")); + handleScroll(); + $(document).on("scroll", () => { + clearTimeout(_debounce); + _debounce = setTimeout(handleScroll, 80); + }); + $(".joe_action_item.scroll").on("click", () => window.scrollTo({ top: 0, behavior: "smooth" })); + } - /* 激活侧边栏人生倒计时功能 */ - { - if ($('.joe_aside__item.timelife').length) { - let timelife = [ - { title: '今日已经过去', endTitle: '小时', num: 0, percent: '0%' }, - { title: '这周已经过去', endTitle: '天', num: 0, percent: '0%' }, - { title: '本月已经过去', endTitle: '天', num: 0, percent: '0%' }, - { title: '今年已经过去', endTitle: '个月', num: 0, percent: '0%' } - ]; - { - let nowDate = +new Date(); - let todayStartDate = new Date(new Date().toLocaleDateString()).getTime(); - let todayPassHours = (nowDate - todayStartDate) / 1000 / 60 / 60; - let todayPassHoursPercent = (todayPassHours / 24) * 100; - timelife[0].num = parseInt(todayPassHours); - timelife[0].percent = parseInt(todayPassHoursPercent) + '%'; - } - { - let weeks = { 0: 7, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6 }; - let weekDay = weeks[new Date().getDay()]; - let weekDayPassPercent = (weekDay / 7) * 100; - timelife[1].num = parseInt(weekDay); - timelife[1].percent = parseInt(weekDayPassPercent) + '%'; - } - { - let year = new Date().getFullYear(); - let date = new Date().getDate(); - let month = new Date().getMonth() + 1; - let monthAll = new Date(year, month, 0).getDate(); - let monthPassPercent = (date / monthAll) * 100; - timelife[2].num = date; - timelife[2].percent = parseInt(monthPassPercent) + '%'; - } - { - let month = new Date().getMonth() + 1; - let yearPass = (month / 12) * 100; - timelife[3].num = month; - timelife[3].percent = parseInt(yearPass) + '%'; - } - let htmlStr = ''; - timelife.forEach((item, index) => { - htmlStr += ` + /* 激活侧边栏人生倒计时功能 */ + { + if ($(".joe_aside__item.timelife").length) { + let timelife = [ + { title: "今日已经过去", endTitle: "小时", num: 0, percent: "0%" }, + { title: "这周已经过去", endTitle: "天", num: 0, percent: "0%" }, + { title: "本月已经过去", endTitle: "天", num: 0, percent: "0%" }, + { title: "今年已经过去", endTitle: "个月", num: 0, percent: "0%" }, + ]; + { + let nowDate = +new Date(); + let todayStartDate = new Date(new Date().toLocaleDateString()).getTime(); + let todayPassHours = (nowDate - todayStartDate) / 1000 / 60 / 60; + let todayPassHoursPercent = (todayPassHours / 24) * 100; + timelife[0].num = parseInt(todayPassHours); + timelife[0].percent = parseInt(todayPassHoursPercent) + "%"; + } + { + let weeks = { 0: 7, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6 }; + let weekDay = weeks[new Date().getDay()]; + let weekDayPassPercent = (weekDay / 7) * 100; + timelife[1].num = parseInt(weekDay); + timelife[1].percent = parseInt(weekDayPassPercent) + "%"; + } + { + let year = new Date().getFullYear(); + let date = new Date().getDate(); + let month = new Date().getMonth() + 1; + let monthAll = new Date(year, month, 0).getDate(); + let monthPassPercent = (date / monthAll) * 100; + timelife[2].num = date; + timelife[2].percent = parseInt(monthPassPercent) + "%"; + } + { + let month = new Date().getMonth() + 1; + let yearPass = (month / 12) * 100; + timelife[3].num = month; + timelife[3].percent = parseInt(yearPass) + "%"; + } + let htmlStr = ""; + timelife.forEach((item, index) => { + htmlStr += `
${item.title} @@ -132,424 +132,520 @@ document.addEventListener('DOMContentLoaded', () => {
${item.percent}
`; - }); - $('.joe_aside__item.timelife .joe_aside__item-contain').html(htmlStr); - } - } + }); + $(".joe_aside__item.timelife .joe_aside__item-contain").html(htmlStr); + } + } - /* 激活侧边栏天气功能 */ - { - if ($('.joe_aside__item.weather').length) { - const key = $('.joe_aside__item.weather').attr('data-key'); - const style = $('.joe_aside__item.weather').attr('data-style'); - const aqiColor = { 1: 'FFFFFF', 2: '4A4A4A', 3: 'FFFFFF' }; - window.WIDGET = { CONFIG: { layout: 2, width: '220', height: '270', background: style, dataColor: aqiColor[style], language: 'zh', key } }; - $.getScript('https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0'); - } - } + /* 激活侧边栏天气功能 */ + { + if ($(".joe_aside__item.weather").length) { + const key = $(".joe_aside__item.weather").attr("data-key"); + const style = $(".joe_aside__item.weather").attr("data-style"); + const aqiColor = { 1: "FFFFFF", 2: "4A4A4A", 3: "FFFFFF" }; + window.WIDGET = { CONFIG: { layout: 2, width: "220", height: "270", background: style, dataColor: aqiColor[style], language: "zh", key } }; + $.getScript("https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0"); + } + } - /* 3d云标签 */ - { - if ($('.joe_aside__item.tags').length) { - const entries = []; - const colors = ['#F8D800', '#0396FF', '#EA5455', '#7367F0', '#32CCBC', '#F6416C', '#28C76F', '#9F44D3', '#F55555', '#736EFE', '#E96D71', '#DE4313', '#D939CD', '#4C83FF', '#F072B6', '#C346C2', '#5961F9', '#FD6585', '#465EFB', '#FFC600', '#FA742B', '#5151E5', '#BB4E75', '#FF52E5', '#49C628', '#00EAFF', '#F067B4', '#F067B4', '#ff9a9e', '#00f2fe', '#4facfe', '#f093fb', '#6fa3ef', '#bc99c4', '#46c47c', '#f9bb3c', '#e8583d', '#f68e5f']; - const random = (min, max) => { - min = Math.ceil(min); - max = Math.floor(max); - return Math.floor(Math.random() * (max - min + 1)) + min; - }; - $('.joe_aside__item-contain .list li').each((i, item) => { - entries.push({ - label: $(item).attr('data-label'), - url: $(item).attr('data-url'), - target: '_blank', - fontColor: colors[random(0, colors.length - 1)], - fontSize: 15 - }); - }); - $('.joe_aside__item-contain .tag').svg3DTagCloud({ - entries, - width: 220, - height: 220, - radius: '65%', - radiusMin: 75, - bgDraw: false, - fov: 800, - speed: 0.5, - fontWeight: 500 - }); - } - } + /* 3d云标签 */ + { + if ($(".joe_aside__item.tags").length) { + const entries = []; + const colors = [ + "#F8D800", + "#0396FF", + "#EA5455", + "#7367F0", + "#32CCBC", + "#F6416C", + "#28C76F", + "#9F44D3", + "#F55555", + "#736EFE", + "#E96D71", + "#DE4313", + "#D939CD", + "#4C83FF", + "#F072B6", + "#C346C2", + "#5961F9", + "#FD6585", + "#465EFB", + "#FFC600", + "#FA742B", + "#5151E5", + "#BB4E75", + "#FF52E5", + "#49C628", + "#00EAFF", + "#F067B4", + "#F067B4", + "#ff9a9e", + "#00f2fe", + "#4facfe", + "#f093fb", + "#6fa3ef", + "#bc99c4", + "#46c47c", + "#f9bb3c", + "#e8583d", + "#f68e5f", + ]; + const random = (min, max) => { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min + 1)) + min; + }; + $(".joe_aside__item-contain .list li").each((i, item) => { + entries.push({ + label: $(item).attr("data-label"), + url: $(item).attr("data-url"), + target: "_blank", + fontColor: colors[random(0, colors.length - 1)], + fontSize: 15, + }); + }); + $(".joe_aside__item-contain .tag").svg3DTagCloud({ + entries, + width: 220, + height: 220, + radius: "65%", + radiusMin: 75, + bgDraw: false, + fov: 800, + speed: 0.5, + fontWeight: 500, + }); + } + } - /* 侧边栏舔狗日记 */ - { - if ($('.joe_aside__item.flatterer').length) { - const arr = ['你昨天晚上又没回我信息,我却看见你的游戏在线,在我再一次孜孜不倦的骚扰你的情况下,你终于跟我说了一句最长的话“**你他妈是不是有病**”,我又陷入了沉思,这一定有什么含义,我想了很久,你竟然提到了我的妈妈,原来你已经想得那么长远了,想和我结婚见我的父母,我太感动了,真的。那你现在在干嘛,我好想你,我妈妈说她也很喜欢你。', '今天我观战了一天你和别人打游戏,**你们玩的很开心**;我给你发了200多条消息,你说没流量就不回;晚上发说说没有人爱你,我连滚带爬评论了句有“我在”,你把我拉黑了,我给你打电话也无人接听。对不起,我不该打扰你,我求求你再给我一次当好友的机会吧!', '我爸说再敢网恋就打断我的腿,幸好不是胳膊,这样我还能继续**和你打字聊天**,就算连胳膊也打断了,我的心里也会有你位置。', '你说你情侣头像是一个人用的,空间上锁是因为你不喜欢玩空间,情侣空间是和闺蜜开的,找你连麦时你说你在忙工作,每次聊天你都说在忙,你真是一个**上进的好女孩**,你真好,我好喜欢你!', '你跟他已经醒了吧?我今天捡垃圾挣了一百多,明天给你打过去。你快点休息吧,我明天叫你起床,给你点外卖买烟,给你点你最喜欢的奶茶。晚上我会继续去摆地摊的,你不用担心我,你床只有那么大睡不下三个。**你要好好照顾好自己,不要让他抢你被子**。我永远爱你!', '她三天没回我的消息了,在我孜孜不倦地骚扰下她终于舍得回我“**nmsl**”,我想这一定是有什么含义吧,噢!我恍然大悟原来是**尼美舒利颗粒**,她知道我有关节炎让我吃尼美舒利颗粒,她还是关心我的,但是又不想显现的那么热情。天啊!她好高冷,我好像更喜欢她了!', '你想我了吧?可以回我消息了吗?我买了万通筋骨贴,你**运动一个晚上腰很疼**吧?今晚早点回家,我炖了排骨汤,我永远在家等你。', '昨晚你和朋友打了一晚上游戏,你破天荒的给我看了战绩,虽然我看不懂但是我相信你一定是最厉害的、最棒的。我给你发了好多消息夸你,告诉你我多崇拜你,你回了我一句“**啥B**”,我翻来覆去思考这是什么意思,Sha[傻],噢你是说我傻,那B就是Baby的意思了吧,原来你是在叫我**傻宝**,这么宠溺的语气,我竟一时不敢相信,其实你也是喜欢我的对吧。', '今天我还是照常给你发消息,汇报日常工作,你终于回了我四个字:“**嗯嗯,好的。**”。你开始愿意敷衍我了,我太感动了,受宠若惊。我愿意天天给你发消息,就算你天天骂我,我也不觉得烦。', '你昨天晚上又没回我的消息,在我孜孜不倦的骚扰下,你终于舍得回我了,你说“**滚**”,这其中一定有什么含义,我想了很久,滚是三点水,这代表你对我的思念也如**滚滚流水**一样汹涌,我感动哭了,不知道你现在在干嘛,我很想你。', '听说你想要一套化妆品,我算了算,明天我去工地上**搬一天砖**,就可以拿到200块钱,再加上我上个月攒下来的零花钱,刚好给你买一套迪奥。', '今天表白被拒绝了,她对我说能不能脱下裤子**撒泡尿照照自己**。当我脱下裤子,她咽了口水,说我们可以试一下。', '刚从派出所出来,原因前几天14号情人节,我想送你礼物,我去偷东西的时候被抓了。我本来想反抗,警察说了一句老实点别动,我立刻就放弃了反抗,因为我记得你说过,你喜欢**老实人**。', '疫情不能出门,现在是早上八点,你肯定饿了吧。我早起做好了早餐来到你小区,保安大哥不让进。我给你打了三个电话你终于接了“**有病啊,我还睡觉呢,你小区门口等着吧**”。啊,我高兴坏了!你终于愿意吃我做的早餐了,还让我等你,啊!啊!啊!好幸福噢!', '我存了两个月钱,给你买了一双**北卡蓝**,你对我说一句“谢谢”,我好开心。这是你第一次对我说两个字,以前你都只对我说滚。今天晚上逛**闲鱼**,看到了你把我送你的北卡蓝发布上去了。我想你一定是在考验我,再次送给你,给你一个惊喜,我爱你。', '昨天**你领完红包就把我删了**,我陷入久久地沉思。我想这其中一定有什么含义,原来你是在欲擒故纵,嫌我不够爱你。无理取闹的你变得更加可爱了,我会坚守我对你的爱的。你放心好啦!今天发工资了,发了1850,给你微信转了520,支付宝1314,还剩下16。给你发了很多消息你没回。剩下16块我在小卖部买了你爱吃的老坛酸菜牛肉面,给你寄过去了。希望你保护好食欲,我去上班了爱你~~', '在保安亭内看完了最新一集的梨泰院,曾经多么倔强的朴世路因为伊瑞给张大熙跪下了,亭外的树也许感受到了**我的悲伤**,枯了。我连树都保护不了,怎么保护你,或许保安才是真的需要被保护的吧。我难受,我想你。over', '难以言喻的下午。说不想你是假的,说爱你是真的。昨天他们骂**我是你的舔狗**,我不相信,因为我知道你肯定也是爱我的,你一定是在考验我对你的感情,只要我坚持下去你一定会被我的真诚所打动,加油!不过我要批评你一下,昨晚你说**去酒店跟人斗地主**,我寻思两个人也玩不了呀。算了,不想了,毕竟打牌是赌博行为,不太好。', '明天就周六了我知道你不上班,但是我怕你睡懒觉不吃早饭饿坏自己。我早晨4点去菜市场买了新鲜活鸡**给你炖鸡汤**,阿姨给我用箱子装了起来,我骑上我280买的电动车哼着小调回家,心想你一定会被我感动的,箱子半路开了,鸡跑了,拐到了一个胡同里,凌晨4点的胡同还有穿超短裙和大叔聊天的美女,不禁感叹这个世界变了,她问我找什么,…………。对不起,我爱你', '12点队长过来准时交班,出去的车辆按喇叭我也没听到,只因我在监控中看到了穿睡衣出来倒垃圾的你,**望你望的入神**不由的傻笑了起来,队长过来骂我扣了我一天工资。我委屈,想抱你。你送的泡面真好吃。', '今天的我排位输了好多把,我将这些事情分享给你,但是你一个字都没有讲,我在想你是不是在忙?我头痛欲裂,终于在我给你发了几十条消息之后,你回了我一个“**脑子是不是有病?**”,原来你还是关心我的,看到这句话,我的脑子一下就不疼了,今天也是爱你的一天。', '我存了半年的工资,给你买了一只LV,你对我说了一句“**你真好**”,我好开心,这是你第一次这么认可我,以前你都只对我说滚。今天晚上逛闲鱼,看到你把我送你的LV发布上去了。我想,你一定是在考验我,于是我用借呗里的钱把它买了下来,再次送给你,给你一个惊喜,我爱你。', '其实我每月工资6000,但我只给你转2000,你以为我给你了全部。才不是,我一共舔了3个啦,**我要舔的雨露均沾**,才不会把你当成唯一。', '昨天你把我拉黑了,我看着红色感叹号陷入了久久的沉思,我想这其中一定有什么含义?红色红色?我明白了!红色代表热情,你对我很热情,你想和我结婚,我愿意。', '今天你问我借了两千块钱,说要做个手术,你果然还是爱我的,**不是我的孩子,你不要**。 ', '中午你无故扇了我一巴掌,我握着你的手说“手怎么这么凉,都怪我没有照顾好你,一定要更加对你好”。', '我给你打了几通电话,你终于接了。听到了**你发出啊啊啊啊的声音**,你说你肚子痛,我想你一定是很难受吧。电话还有个男的对你说“来换个姿势”,一定是**在做理疗**了。期待你早日康复,我好担心。', '昨天晚上好冷,本来以为街上没人,结果刚刚**偷电动车**的时候被抓了,本来想反抗,但警察说了一句老实点别动,我立刻就放弃了抵抗,因为我记得你说过,你喜欢**老实人**。', '找你连麦时你说你在忙工作,每次聊天你都说在忙,你真是一个**上进的好女孩**,你真好,发现我越来越喜欢这样优秀的你。', '你从来没说过爱我,聊天记录搜索了一下“爱”,唯一的一条是:**你好像乡村爱情里的刘能啊**。', '今天好开心啊,和你一起在峡谷嬉戏,打完一波团战之后看到你在打大龙,残血的我跳过去直接被龙爪拍死,但这一刻我觉得好浪漫,**死在你的脚旁边,这是我离你最近的一次**。', '哥们,求你和她说句话吧,这样她就不会那么难过了。', '今天你把我的微信拉黑了,这下我终于解放了!以前我总担心太多消息会打扰你,现在我终于不用顾忌,不管我怎么给你发消息,都不会让你不开心了。等我**攒够5201314条**我就拿给你看,你一定会震惊得说不出话然后哭着说会爱我一辈子。哈哈。', '昨天你把我删了,我陷入了久久的沉思 。我想这其中一定有什么含义,你应该是欲擒故纵吧,嫌我不够爱你。突然觉得**无理取闹的你变得更加可爱**了,我会坚守我对你的爱的 你放心好啦!这么一想,突然对我俩的未来更有期望了呢。', '今天上班不是太忙,百无聊赖,又翻出了你的相片,看了又看。今天是我认识你的第302天,也是我爱你的第302天,可是这些你并不知道,也许**你知道了,也不会在意**吧。 此刻的我好想你! ', '今天你跟我说我很丑,让我不要骚扰你了。我听了很高兴,小说里的主角都像你这样,最开始表现的很厌恶,但最后**总会被我的真心打动**。你现在有多讨厌我,以后就会有多爱我。嘻嘻。', '我坐在窗边给你发了99条消息,你终于肯回我了,你说“**发你妈啊**”,我一下子就哭了。原来努力真的有用,你已经开始考虑想见我的妈妈了,你也是挺喜欢我的。', '刚才我找你说话,你回了一个滚,我陷入了沉思,你还是如此的关心我,知道我腿受伤了,让我这样走,好感动!看来你还是爱我的!', '今天下雨了,我去你公司接你下班。看见我你不耐烦的说“**烦不烦啊,不要再找我了**”,一头冲进雨里就跑开了。我心里真高兴啊,你宁愿自己淋雨,都不愿让我也淋湿一点,你果然还是爱我的。', '晚上和你聊天,10点钟不到,你就说“**困了,去睡觉了**”。现在凌晨1点钟,看到你给他的朋友圈点赞评论,约他明天去吃火锅,一定是你微信被盗了吧。', '今天我主动给你发了游戏邀请,邀请你和我单挑安琪拉,虽然我安琪拉很菜,可是为了和你打游戏,我还是毅然决然给你发了邀请。你说你不接受,你在打其他游戏。联想到我自己很菜,我突然明白,原来你还是在乎我的,只是不想一遍遍连招一套的在泉水送我走。我再一次感动哭了,因此,我好像更喜欢你了,你可真是一个宝藏男孩!', '你的头像是一个女孩子左手边牵着一条秋田犬,犬=狗,而**我是一条舔狗**。是不是代表你的小手在牵着我呢?', '今天发工资了,我一个月工资3000,你猜我会给你多少,是不是觉得我会给你2500,自己留500吃饭?你想多了,我3000都给你,因为厂里包吃包住。', '昨天就为你充了710点卷,虽然知道你不会玩不知去向,但你说好看,你刚才说小号想要还想要一个,爱你的我还是满心欢喜的把剩下的100元伙食费又给你充了710,然后看到你小号并没有买,而是你送给了你的一个弟弟,你对弟弟真好,好有爱心,我感觉对你陷得很深了。', '今天我给你发消息,你回复我“**nmsl**”,我想了半天才知道你是在夸我,原来是**你美死了**,你嘴真甜,我爱你。', '你说你想买口红,今天我去了叔叔的口罩厂做了一天的打包。拿到了两百块钱,加上我这几天**省下的钱刚好能给你买一根小金条**。即没有给我自己剩下一分钱,但你不用担心,因为厂里包吃包住。对了打包的时候,满脑子都是你,想着你哪天突然就接受我的橄榄枝了呢。而且今天我很棒呢,主管表扬我很能干,其实也有你的功劳啦,是你给了我无穷的力量。今天我比昨天多想你一点,比明天少想你一点。', '在我一如既往的每天跟她问早安的时候,她今天终于回我了。我激动地问她我是不是今天第一个跟她说话的人,她说不是,是**她男朋友把她叫起来退房**的。', '听说你朋友说今天出门了,我打扮成精神小伙来找你,没想到你竟然对我说“**给我爬,别过来**”我当场就哭了,原来真心真的会感动人,你一定是知道,穿豆豆鞋走路脚会很累,让我爬是因为这样不会累着脚,其实你是喜欢我的吧', '今天把你的备注改成了「**对方正在输入...**」,这样我就知道你不是不想回我,刚又给你发了消息,看到你在思考怎么回我,我就知道你和我一样,心里有我。', '今天在楼上窗户上看见你和他在公园里接吻,我看见哭了出来,并打电话给你,想问问你为什么?但你说怎么了,声音是那么好听。于是我说“**以后你和他接吻的时候,能不能用我送给你的口红啊?**”', '我退了无关紧要的群,唯独这个群我没有退,因为这里有一个对我来说很特别的女孩子,我们不是好友,**我每天只能通过群名片看看她**,虽然一张照片也看不到,我也知足了,我不敢说她的名字,但我知道她是群里面最美的女孩子,她说我们这样会距离产生美~ 我想想发现她说的挺对的,我心里很开心。', '今天早上我告诉你我想你了,你没理我。今天中午我给你打电话,你不接,打第二个你就关机。晚上我在你公司楼下等你,你对我说的第一句话就是滚“**滚,别烦我,别浪费时间了**”,我真的好感动,你居然为我考虑了,怕我浪费时间。呜呜呜,这是我爱你的第74天。', '我坐在窗边给你发了99条消息,你终于肯回我了你说“**发你妈啊**”,我一下子就哭了,原来努力真的有用,你已经开始考虑想见我的妈妈了,你其实也是挺喜欢我的。', '你一个小时没回我的消息,在我孜孜不倦地骚扰下你终于舍得回我了“**在做爱**”,这其中一定有什么含义,我想了很久,“在做爱”这简简单单的三个字肯定是三句话,分别是**我在忙、做你女朋友、我爱你**,想到这里我不禁流下了眼泪,我这么长时间的喜欢没有白费,不知道你现在忙干嘛,但我很想你。', '最近我暗恋的女生每天都和不同的男生约会,我想总有一天会轮到我,我问她什么时候能见见我?她说**下辈子吧**。她真好,下辈子还要和我在一起。', '你好像从来没有对我说过晚安,我在我们的聊天记录里搜索了关键字:“晚安”,你说过一次:**我早晚安排人弄死你**。']; - const random = (min, max) => { - min = Math.ceil(min); - max = Math.floor(max); - return Math.floor(Math.random() * (max - min + 1)) + min; - }; - const toggle = () => { - $('.joe_aside__item.flatterer .content').html(arr[random(0, arr.length - 1)].replace(/\*\*(.*?)\*\*/g, '$1')); - $('.joe_aside__item.flatterer .content').attr('class', 'content type' + random(1, 6)); - }; - toggle(); - $('.joe_aside__item.flatterer .change').on('click', () => toggle()); - } - } + /* 侧边栏舔狗日记 */ + { + if ($(".joe_aside__item.flatterer").length) { + const arr = [ + "你昨天晚上又没回我信息,我却看见你的游戏在线,在我再一次孜孜不倦的骚扰你的情况下,你终于跟我说了一句最长的话“**你他妈是不是有病**”,我又陷入了沉思,这一定有什么含义,我想了很久,你竟然提到了我的妈妈,原来你已经想得那么长远了,想和我结婚见我的父母,我太感动了,真的。那你现在在干嘛,我好想你,我妈妈说她也很喜欢你。", + "今天我观战了一天你和别人打游戏,**你们玩的很开心**;我给你发了200多条消息,你说没流量就不回;晚上发说说没有人爱你,我连滚带爬评论了句有“我在”,你把我拉黑了,我给你打电话也无人接听。对不起,我不该打扰你,我求求你再给我一次当好友的机会吧!", + "我爸说再敢网恋就打断我的腿,幸好不是胳膊,这样我还能继续**和你打字聊天**,就算连胳膊也打断了,我的心里也会有你位置。", + "你说你情侣头像是一个人用的,空间上锁是因为你不喜欢玩空间,情侣空间是和闺蜜开的,找你连麦时你说你在忙工作,每次聊天你都说在忙,你真是一个**上进的好女孩**,你真好,我好喜欢你!", + "你跟他已经醒了吧?我今天捡垃圾挣了一百多,明天给你打过去。你快点休息吧,我明天叫你起床,给你点外卖买烟,给你点你最喜欢的奶茶。晚上我会继续去摆地摊的,你不用担心我,你床只有那么大睡不下三个。**你要好好照顾好自己,不要让他抢你被子**。我永远爱你!", + "她三天没回我的消息了,在我孜孜不倦地骚扰下她终于舍得回我“**nmsl**”,我想这一定是有什么含义吧,噢!我恍然大悟原来是**尼美舒利颗粒**,她知道我有关节炎让我吃尼美舒利颗粒,她还是关心我的,但是又不想显现的那么热情。天啊!她好高冷,我好像更喜欢她了!", + "你想我了吧?可以回我消息了吗?我买了万通筋骨贴,你**运动一个晚上腰很疼**吧?今晚早点回家,我炖了排骨汤,我永远在家等你。", + "昨晚你和朋友打了一晚上游戏,你破天荒的给我看了战绩,虽然我看不懂但是我相信你一定是最厉害的、最棒的。我给你发了好多消息夸你,告诉你我多崇拜你,你回了我一句“**啥B**”,我翻来覆去思考这是什么意思,Sha[傻],噢你是说我傻,那B就是Baby的意思了吧,原来你是在叫我**傻宝**,这么宠溺的语气,我竟一时不敢相信,其实你也是喜欢我的对吧。", + "今天我还是照常给你发消息,汇报日常工作,你终于回了我四个字:“**嗯嗯,好的。**”。你开始愿意敷衍我了,我太感动了,受宠若惊。我愿意天天给你发消息,就算你天天骂我,我也不觉得烦。", + "你昨天晚上又没回我的消息,在我孜孜不倦的骚扰下,你终于舍得回我了,你说“**滚**”,这其中一定有什么含义,我想了很久,滚是三点水,这代表你对我的思念也如**滚滚流水**一样汹涌,我感动哭了,不知道你现在在干嘛,我很想你。", + "听说你想要一套化妆品,我算了算,明天我去工地上**搬一天砖**,就可以拿到200块钱,再加上我上个月攒下来的零花钱,刚好给你买一套迪奥。", + "今天表白被拒绝了,她对我说能不能脱下裤子**撒泡尿照照自己**。当我脱下裤子,她咽了口水,说我们可以试一下。", + "刚从派出所出来,原因前几天14号情人节,我想送你礼物,我去偷东西的时候被抓了。我本来想反抗,警察说了一句老实点别动,我立刻就放弃了反抗,因为我记得你说过,你喜欢**老实人**。", + "疫情不能出门,现在是早上八点,你肯定饿了吧。我早起做好了早餐来到你小区,保安大哥不让进。我给你打了三个电话你终于接了“**有病啊,我还睡觉呢,你小区门口等着吧**”。啊,我高兴坏了!你终于愿意吃我做的早餐了,还让我等你,啊!啊!啊!好幸福噢!", + "我存了两个月钱,给你买了一双**北卡蓝**,你对我说一句“谢谢”,我好开心。这是你第一次对我说两个字,以前你都只对我说滚。今天晚上逛**闲鱼**,看到了你把我送你的北卡蓝发布上去了。我想你一定是在考验我,再次送给你,给你一个惊喜,我爱你。", + "昨天**你领完红包就把我删了**,我陷入久久地沉思。我想这其中一定有什么含义,原来你是在欲擒故纵,嫌我不够爱你。无理取闹的你变得更加可爱了,我会坚守我对你的爱的。你放心好啦!今天发工资了,发了1850,给你微信转了520,支付宝1314,还剩下16。给你发了很多消息你没回。剩下16块我在小卖部买了你爱吃的老坛酸菜牛肉面,给你寄过去了。希望你保护好食欲,我去上班了爱你~~", + "在保安亭内看完了最新一集的梨泰院,曾经多么倔强的朴世路因为伊瑞给张大熙跪下了,亭外的树也许感受到了**我的悲伤**,枯了。我连树都保护不了,怎么保护你,或许保安才是真的需要被保护的吧。我难受,我想你。over", + "难以言喻的下午。说不想你是假的,说爱你是真的。昨天他们骂**我是你的舔狗**,我不相信,因为我知道你肯定也是爱我的,你一定是在考验我对你的感情,只要我坚持下去你一定会被我的真诚所打动,加油!不过我要批评你一下,昨晚你说**去酒店跟人斗地主**,我寻思两个人也玩不了呀。算了,不想了,毕竟打牌是赌博行为,不太好。", + "明天就周六了我知道你不上班,但是我怕你睡懒觉不吃早饭饿坏自己。我早晨4点去菜市场买了新鲜活鸡**给你炖鸡汤**,阿姨给我用箱子装了起来,我骑上我280买的电动车哼着小调回家,心想你一定会被我感动的,箱子半路开了,鸡跑了,拐到了一个胡同里,凌晨4点的胡同还有穿超短裙和大叔聊天的美女,不禁感叹这个世界变了,她问我找什么,…………。对不起,我爱你", + "12点队长过来准时交班,出去的车辆按喇叭我也没听到,只因我在监控中看到了穿睡衣出来倒垃圾的你,**望你望的入神**不由的傻笑了起来,队长过来骂我扣了我一天工资。我委屈,想抱你。你送的泡面真好吃。", + "今天的我排位输了好多把,我将这些事情分享给你,但是你一个字都没有讲,我在想你是不是在忙?我头痛欲裂,终于在我给你发了几十条消息之后,你回了我一个“**脑子是不是有病?**”,原来你还是关心我的,看到这句话,我的脑子一下就不疼了,今天也是爱你的一天。", + "我存了半年的工资,给你买了一只LV,你对我说了一句“**你真好**”,我好开心,这是你第一次这么认可我,以前你都只对我说滚。今天晚上逛闲鱼,看到你把我送你的LV发布上去了。我想,你一定是在考验我,于是我用借呗里的钱把它买了下来,再次送给你,给你一个惊喜,我爱你。", + "其实我每月工资6000,但我只给你转2000,你以为我给你了全部。才不是,我一共舔了3个啦,**我要舔的雨露均沾**,才不会把你当成唯一。", + "昨天你把我拉黑了,我看着红色感叹号陷入了久久的沉思,我想这其中一定有什么含义?红色红色?我明白了!红色代表热情,你对我很热情,你想和我结婚,我愿意。", + "今天你问我借了两千块钱,说要做个手术,你果然还是爱我的,**不是我的孩子,你不要**。 ", + "中午你无故扇了我一巴掌,我握着你的手说“手怎么这么凉,都怪我没有照顾好你,一定要更加对你好”。", + "我给你打了几通电话,你终于接了。听到了**你发出啊啊啊啊的声音**,你说你肚子痛,我想你一定是很难受吧。电话还有个男的对你说“来换个姿势”,一定是**在做理疗**了。期待你早日康复,我好担心。", + "昨天晚上好冷,本来以为街上没人,结果刚刚**偷电动车**的时候被抓了,本来想反抗,但警察说了一句老实点别动,我立刻就放弃了抵抗,因为我记得你说过,你喜欢**老实人**。", + "找你连麦时你说你在忙工作,每次聊天你都说在忙,你真是一个**上进的好女孩**,你真好,发现我越来越喜欢这样优秀的你。", + "你从来没说过爱我,聊天记录搜索了一下“爱”,唯一的一条是:**你好像乡村爱情里的刘能啊**。", + "今天好开心啊,和你一起在峡谷嬉戏,打完一波团战之后看到你在打大龙,残血的我跳过去直接被龙爪拍死,但这一刻我觉得好浪漫,**死在你的脚旁边,这是我离你最近的一次**。", + "哥们,求你和她说句话吧,这样她就不会那么难过了。", + "今天你把我的微信拉黑了,这下我终于解放了!以前我总担心太多消息会打扰你,现在我终于不用顾忌,不管我怎么给你发消息,都不会让你不开心了。等我**攒够5201314条**我就拿给你看,你一定会震惊得说不出话然后哭着说会爱我一辈子。哈哈。", + "昨天你把我删了,我陷入了久久的沉思 。我想这其中一定有什么含义,你应该是欲擒故纵吧,嫌我不够爱你。突然觉得**无理取闹的你变得更加可爱**了,我会坚守我对你的爱的 你放心好啦!这么一想,突然对我俩的未来更有期望了呢。", + "今天上班不是太忙,百无聊赖,又翻出了你的相片,看了又看。今天是我认识你的第302天,也是我爱你的第302天,可是这些你并不知道,也许**你知道了,也不会在意**吧。 此刻的我好想你! ", + "今天你跟我说我很丑,让我不要骚扰你了。我听了很高兴,小说里的主角都像你这样,最开始表现的很厌恶,但最后**总会被我的真心打动**。你现在有多讨厌我,以后就会有多爱我。嘻嘻。", + "我坐在窗边给你发了99条消息,你终于肯回我了,你说“**发你妈啊**”,我一下子就哭了。原来努力真的有用,你已经开始考虑想见我的妈妈了,你也是挺喜欢我的。", + "刚才我找你说话,你回了一个滚,我陷入了沉思,你还是如此的关心我,知道我腿受伤了,让我这样走,好感动!看来你还是爱我的!", + "今天下雨了,我去你公司接你下班。看见我你不耐烦的说“**烦不烦啊,不要再找我了**”,一头冲进雨里就跑开了。我心里真高兴啊,你宁愿自己淋雨,都不愿让我也淋湿一点,你果然还是爱我的。", + "晚上和你聊天,10点钟不到,你就说“**困了,去睡觉了**”。现在凌晨1点钟,看到你给他的朋友圈点赞评论,约他明天去吃火锅,一定是你微信被盗了吧。", + "今天我主动给你发了游戏邀请,邀请你和我单挑安琪拉,虽然我安琪拉很菜,可是为了和你打游戏,我还是毅然决然给你发了邀请。你说你不接受,你在打其他游戏。联想到我自己很菜,我突然明白,原来你还是在乎我的,只是不想一遍遍连招一套的在泉水送我走。我再一次感动哭了,因此,我好像更喜欢你了,你可真是一个宝藏男孩!", + "你的头像是一个女孩子左手边牵着一条秋田犬,犬=狗,而**我是一条舔狗**。是不是代表你的小手在牵着我呢?", + "今天发工资了,我一个月工资3000,你猜我会给你多少,是不是觉得我会给你2500,自己留500吃饭?你想多了,我3000都给你,因为厂里包吃包住。", + "昨天就为你充了710点卷,虽然知道你不会玩不知去向,但你说好看,你刚才说小号想要还想要一个,爱你的我还是满心欢喜的把剩下的100元伙食费又给你充了710,然后看到你小号并没有买,而是你送给了你的一个弟弟,你对弟弟真好,好有爱心,我感觉对你陷得很深了。", + "今天我给你发消息,你回复我“**nmsl**”,我想了半天才知道你是在夸我,原来是**你美死了**,你嘴真甜,我爱你。", + "你说你想买口红,今天我去了叔叔的口罩厂做了一天的打包。拿到了两百块钱,加上我这几天**省下的钱刚好能给你买一根小金条**。即没有给我自己剩下一分钱,但你不用担心,因为厂里包吃包住。对了打包的时候,满脑子都是你,想着你哪天突然就接受我的橄榄枝了呢。而且今天我很棒呢,主管表扬我很能干,其实也有你的功劳啦,是你给了我无穷的力量。今天我比昨天多想你一点,比明天少想你一点。", + "在我一如既往的每天跟她问早安的时候,她今天终于回我了。我激动地问她我是不是今天第一个跟她说话的人,她说不是,是**她男朋友把她叫起来退房**的。", + "听说你朋友说今天出门了,我打扮成精神小伙来找你,没想到你竟然对我说“**给我爬,别过来**”我当场就哭了,原来真心真的会感动人,你一定是知道,穿豆豆鞋走路脚会很累,让我爬是因为这样不会累着脚,其实你是喜欢我的吧", + "今天把你的备注改成了「**对方正在输入...**」,这样我就知道你不是不想回我,刚又给你发了消息,看到你在思考怎么回我,我就知道你和我一样,心里有我。", + "今天在楼上窗户上看见你和他在公园里接吻,我看见哭了出来,并打电话给你,想问问你为什么?但你说怎么了,声音是那么好听。于是我说“**以后你和他接吻的时候,能不能用我送给你的口红啊?**”", + "我退了无关紧要的群,唯独这个群我没有退,因为这里有一个对我来说很特别的女孩子,我们不是好友,**我每天只能通过群名片看看她**,虽然一张照片也看不到,我也知足了,我不敢说她的名字,但我知道她是群里面最美的女孩子,她说我们这样会距离产生美~ 我想想发现她说的挺对的,我心里很开心。", + "今天早上我告诉你我想你了,你没理我。今天中午我给你打电话,你不接,打第二个你就关机。晚上我在你公司楼下等你,你对我说的第一句话就是滚“**滚,别烦我,别浪费时间了**”,我真的好感动,你居然为我考虑了,怕我浪费时间。呜呜呜,这是我爱你的第74天。", + "我坐在窗边给你发了99条消息,你终于肯回我了你说“**发你妈啊**”,我一下子就哭了,原来努力真的有用,你已经开始考虑想见我的妈妈了,你其实也是挺喜欢我的。", + "你一个小时没回我的消息,在我孜孜不倦地骚扰下你终于舍得回我了“**在做爱**”,这其中一定有什么含义,我想了很久,“在做爱”这简简单单的三个字肯定是三句话,分别是**我在忙、做你女朋友、我爱你**,想到这里我不禁流下了眼泪,我这么长时间的喜欢没有白费,不知道你现在忙干嘛,但我很想你。", + "最近我暗恋的女生每天都和不同的男生约会,我想总有一天会轮到我,我问她什么时候能见见我?她说**下辈子吧**。她真好,下辈子还要和我在一起。", + "你好像从来没有对我说过晚安,我在我们的聊天记录里搜索了关键字:“晚安”,你说过一次:**我早晚安排人弄死你**。", + ]; + const random = (min, max) => { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min + 1)) + min; + }; + const toggle = () => { + $(".joe_aside__item.flatterer .content").html(arr[random(0, arr.length - 1)].replace(/\*\*(.*?)\*\*/g, "$1")); + $(".joe_aside__item.flatterer .content").attr("class", "content type" + random(1, 6)); + }; + toggle(); + $(".joe_aside__item.flatterer .change").on("click", () => toggle()); + } + } - /* 激活Live2d人物 */ - { - if (Joe.LIVE2D !== 'off' && Joe.LIVE2D) { - $.getScript('https://cdn.jsdelivr.net/npm/live2d-widget@3.1.4/lib/L2Dwidget.min.js', () => { - L2Dwidget.init({ - model: { jsonPath: Joe.LIVE2D, scale: 1 }, - mobile: { show: false }, - display: { position: 'right', width: 160, height: 200, hOffset: 70, vOffset: 0 } - }); - }); - } - } + /* 激活Live2d人物 */ + { + if (Joe.LIVE2D !== "off" && Joe.LIVE2D) { + $.getScript("https://fastly.jsdelivr.net/npm/live2d-widget@3.1.4/lib/L2Dwidget.min.js", () => { + L2Dwidget.init({ + model: { jsonPath: Joe.LIVE2D, scale: 1 }, + mobile: { show: false }, + display: { position: "right", width: 160, height: 200, hOffset: 70, vOffset: 0 }, + }); + }); + } + } - /* 评论框点击切换画图模式和文本模式 */ - { - if ($('.joe_comment').length) { - $('.joe_comment__respond-type .item').on('click', function () { - $(this).addClass('active').siblings().removeClass('active'); - if ($(this).attr('data-type') === 'draw') { - $('.joe_comment__respond-form .body .draw').show().siblings().hide(); - $('#joe_comment_draw').prop('width', $('.joe_comment__respond-form .body').width()); - /* 设置表单格式为画图模式 */ - $('.joe_comment__respond-form').attr('data-type', 'draw'); - } else { - $('.joe_comment__respond-form .body .text').show().siblings().hide(); - /* 设置表单格式为文字模式 */ - $('.joe_comment__respond-form').attr('data-type', 'text'); - } - }); - } - } + /* 评论框点击切换画图模式和文本模式 */ + { + if ($(".joe_comment").length) { + $(".joe_comment__respond-type .item").on("click", function () { + $(this).addClass("active").siblings().removeClass("active"); + if ($(this).attr("data-type") === "draw") { + $(".joe_comment__respond-form .body .draw").show().siblings().hide(); + $("#joe_comment_draw").prop("width", $(".joe_comment__respond-form .body").width()); + /* 设置表单格式为画图模式 */ + $(".joe_comment__respond-form").attr("data-type", "draw"); + } else { + $(".joe_comment__respond-form .body .text").show().siblings().hide(); + /* 设置表单格式为文字模式 */ + $(".joe_comment__respond-form").attr("data-type", "text"); + } + }); + } + } - /* 激活画图功能 */ - { - if ($('#joe_comment_draw').length) { - /* 激活画板 */ - window.sketchpad = new Sketchpad({ element: '#joe_comment_draw', height: 300, penSize: 5, color: '303133' }); - /* 撤销上一步 */ - $('.joe_comment__respond-form .body .draw .icon-undo').on('click', () => window.sketchpad.undo()); - /* 动画预览 */ - $('.joe_comment__respond-form .body .draw .icon-animate').on('click', () => window.sketchpad.animate(10)); - /* 更改画板的线宽 */ - $('.joe_comment__respond-form .body .draw .line li').on('click', function () { - window.sketchpad.penSize = $(this).attr('data-line'); - $(this).addClass('active').siblings().removeClass('active'); - }); - /* 更改画板的颜色 */ - $('.joe_comment__respond-form .body .draw .color li').on('click', function () { - window.sketchpad.color = $(this).attr('data-color'); - $(this).addClass('active').siblings().removeClass('active'); - }); - } - } + /* 激活画图功能 */ + { + if ($("#joe_comment_draw").length) { + /* 激活画板 */ + window.sketchpad = new Sketchpad({ element: "#joe_comment_draw", height: 300, penSize: 5, color: "303133" }); + /* 撤销上一步 */ + $(".joe_comment__respond-form .body .draw .icon-undo").on("click", () => window.sketchpad.undo()); + /* 动画预览 */ + $(".joe_comment__respond-form .body .draw .icon-animate").on("click", () => window.sketchpad.animate(10)); + /* 更改画板的线宽 */ + $(".joe_comment__respond-form .body .draw .line li").on("click", function () { + window.sketchpad.penSize = $(this).attr("data-line"); + $(this).addClass("active").siblings().removeClass("active"); + }); + /* 更改画板的颜色 */ + $(".joe_comment__respond-form .body .draw .color li").on("click", function () { + window.sketchpad.color = $(this).attr("data-color"); + $(this).addClass("active").siblings().removeClass("active"); + }); + } + } - /* 重写评论功能 */ - { - if ($('.joe_comment__respond').length) { - const respond = $('.joe_comment__respond'); - /* 重写回复功能 */ - $('.joe_comment__reply').on('click', function () { - /* 父级ID */ - const coid = $(this).attr('data-coid'); - /* 当前的项 */ - const item = $('#' + $(this).attr('data-id')); - /* 添加自定义属性表示父级ID */ - respond.find('.joe_comment__respond-form').attr('data-coid', coid); - item.append(respond); - $(".joe_comment__respond-type .item[data-type='text']").click(); - $('.joe_comment__cancle').show(); - window.scrollTo({ - top: item.offset().top - $('.joe_header').height() - 15, - behavior: 'smooth' - }); - }); - /* 重写取消回复功能 */ - $('.joe_comment__cancle').on('click', function () { - /* 移除自定义属性父级ID */ - respond.find('.joe_comment__respond-form').removeAttr('data-coid'); - $('.joe_comment__cancle').hide(); - $('.joe_comment__title').after(respond); - $(".joe_comment__respond-type .item[data-type='text']").click(); - window.scrollTo({ - top: $('.joe_comment').offset().top - $('.joe_header').height() - 15, - behavior: 'smooth' - }); - }); - } - } + /* 重写评论功能 */ + { + if ($(".joe_comment__respond").length) { + const respond = $(".joe_comment__respond"); + /* 重写回复功能 */ + $(".joe_comment__reply").on("click", function () { + /* 父级ID */ + const coid = $(this).attr("data-coid"); + /* 当前的项 */ + const item = $("#" + $(this).attr("data-id")); + /* 添加自定义属性表示父级ID */ + respond.find(".joe_comment__respond-form").attr("data-coid", coid); + item.append(respond); + $(".joe_comment__respond-type .item[data-type='text']").click(); + $(".joe_comment__cancle").show(); + window.scrollTo({ + top: item.offset().top - $(".joe_header").height() - 15, + behavior: "smooth", + }); + }); + /* 重写取消回复功能 */ + $(".joe_comment__cancle").on("click", function () { + /* 移除自定义属性父级ID */ + respond.find(".joe_comment__respond-form").removeAttr("data-coid"); + $(".joe_comment__cancle").hide(); + $(".joe_comment__title").after(respond); + $(".joe_comment__respond-type .item[data-type='text']").click(); + window.scrollTo({ + top: $(".joe_comment").offset().top - $(".joe_header").height() - 15, + behavior: "smooth", + }); + }); + } + } - /* 激活评论提交 */ - { - if ($('.joe_comment').length) { - let isSubmit = false; - $('.joe_comment__respond-form').on('submit', function (e) { - e.preventDefault(); - const action = $('.joe_comment__respond-form').attr('action') + '?time=' + +new Date(); - const type = $('.joe_comment__respond-form').attr('data-type'); - const parent = $('.joe_comment__respond-form').attr('data-coid'); - const author = $(".joe_comment__respond-form .head input[name='author']").val(); - const _ = $(".joe_comment__respond-form input[name='_']").val(); - const mail = $(".joe_comment__respond-form .head input[name='mail']").val(); - const url = $(".joe_comment__respond-form .head input[name='url']").val(); - let text = $(".joe_comment__respond-form .body textarea[name='text']").val(); - if (author.trim() === '') return Qmsg.info('请输入昵称!'); - if (!/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(mail)) return Qmsg.info('请输入正确的邮箱!'); - if (type === 'text' && text.trim() === '') return Qmsg.info('请输入评论内容!'); - if (type === 'draw') { - const txt = $('#joe_comment_draw')[0].toDataURL('image/webp', 0.1); - text = '{!{' + txt + '}!} '; - } - if (isSubmit) return; - isSubmit = true; - $('.joe_comment__respond-form .foot .submit button').html('发送中...'); - $.ajax({ - url: action, - type: 'POST', - data: { author, mail, text, parent, url, _ }, - dataType: 'text', - success(res) { - let arr = [], - str = ''; - arr = $(res).contents(); - Array.from(arr).forEach(_ => { - if (_.parentNode.className === 'container') str = _; - }); - if (!/Joe/.test(res)) { - Qmsg.warning(str.textContent.trim() || ''); - isSubmit = false; - $('.joe_comment__respond-form .foot .submit button').html('发表评论'); - } else { - window.location.reload(); - } - }, - error() { - isSubmit = false; - $('.joe_comment__respond-form .foot .submit button').html('发表评论'); - Qmsg.warning('发送失败!请刷新重试!'); - } - }); - }); - } - } + /* 激活评论提交 */ + { + if ($(".joe_comment").length) { + let isSubmit = false; + $(".joe_comment__respond-form").on("submit", function (e) { + e.preventDefault(); + const action = $(".joe_comment__respond-form").attr("action") + "?time=" + +new Date(); + const type = $(".joe_comment__respond-form").attr("data-type"); + const parent = $(".joe_comment__respond-form").attr("data-coid"); + const author = $(".joe_comment__respond-form .head input[name='author']").val(); + const _ = $(".joe_comment__respond-form input[name='_']").val(); + const mail = $(".joe_comment__respond-form .head input[name='mail']").val(); + const url = $(".joe_comment__respond-form .head input[name='url']").val(); + let text = $(".joe_comment__respond-form .body textarea[name='text']").val(); + if (author.trim() === "") return Qmsg.info("请输入昵称!"); + if (!/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(mail)) return Qmsg.info("请输入正确的邮箱!"); + if (type === "text" && text.trim() === "") return Qmsg.info("请输入评论内容!"); + if (type === "draw") { + const txt = $("#joe_comment_draw")[0].toDataURL("image/webp", 0.1); + text = "{!{" + txt + "}!} "; + } + if (isSubmit) return; + isSubmit = true; + $(".joe_comment__respond-form .foot .submit button").html("发送中..."); + $.ajax({ + url: action, + type: "POST", + data: { author, mail, text, parent, url, _ }, + dataType: "text", + success(res) { + let arr = [], + str = ""; + arr = $(res).contents(); + Array.from(arr).forEach((_) => { + if (_.parentNode.className === "container") str = _; + }); + if (!/Joe/.test(res)) { + Qmsg.warning(str.textContent.trim() || ""); + isSubmit = false; + $(".joe_comment__respond-form .foot .submit button").html("发表评论"); + } else { + window.location.reload(); + } + }, + error() { + isSubmit = false; + $(".joe_comment__respond-form .foot .submit button").html("发表评论"); + Qmsg.warning("发送失败!请刷新重试!"); + }, + }); + }); + } + } - /* 设置评论回复网址为新窗口打开 */ - { - $('.comment-list__item .term .content .user .author a').each((index, item) => $(item).attr('target', '_blank')); - } + /* 设置评论回复网址为新窗口打开 */ + { + $(".comment-list__item .term .content .user .author a").each((index, item) => $(item).attr("target", "_blank")); + } - /* 格式化评论分页的hash值 */ - { - $('.joe_comment .joe_pagination a').each((index, item) => { - const href = $(item).attr('href'); - if (href && href.includes('#')) { - $(item).attr('href', href.replace('#comments', '?scroll=joe_comment')); - } - }); - } + /* 格式化评论分页的hash值 */ + { + $(".joe_comment .joe_pagination a").each((index, item) => { + const href = $(item).attr("href"); + if (href && href.includes("#")) { + $(item).attr("href", href.replace("#comments", "?scroll=joe_comment")); + } + }); + } - /* 切换标签显示不同的标题 */ - { - if (Joe.DOCUMENT_TITLE) { - const TITLE = document.title; - document.addEventListener('visibilitychange', () => { - if (document.visibilityState === 'hidden') { - document.title = Joe.DOCUMENT_TITLE; - } else { - document.title = TITLE; - } - }); - } - } + /* 切换标签显示不同的标题 */ + { + if (Joe.DOCUMENT_TITLE) { + const TITLE = document.title; + document.addEventListener("visibilitychange", () => { + if (document.visibilityState === "hidden") { + document.title = Joe.DOCUMENT_TITLE; + } else { + document.title = TITLE; + } + }); + } + } - /* 小屏幕伸缩侧边栏 */ - { - $('.joe_header__above-slideicon').on('click', function () { - /* 关闭搜索框 */ - $('.joe_header__searchout').removeClass('active'); - /* 处理开启关闭状态 */ - if ($('.joe_header__slideout').hasClass('active')) { - $('body').css('overflow', ''); - $('.joe_header__mask').removeClass('active slideout'); - $('.joe_header__slideout').removeClass('active'); - } else { - $('body').css('overflow', 'hidden'); - $('.joe_header__mask').addClass('active slideout'); - $('.joe_header__slideout').addClass('active'); - } - }); - } + /* 小屏幕伸缩侧边栏 */ + { + $(".joe_header__above-slideicon").on("click", function () { + /* 关闭搜索框 */ + $(".joe_header__searchout").removeClass("active"); + /* 处理开启关闭状态 */ + if ($(".joe_header__slideout").hasClass("active")) { + $("body").css("overflow", ""); + $(".joe_header__mask").removeClass("active slideout"); + $(".joe_header__slideout").removeClass("active"); + } else { + $("body").css("overflow", "hidden"); + $(".joe_header__mask").addClass("active slideout"); + $(".joe_header__slideout").addClass("active"); + } + }); + } - /* 小屏幕搜索框 */ - { - $('.joe_header__above-searchicon').on('click', function () { - /* 关闭侧边栏 */ - $('.joe_header__slideout').removeClass('active'); - /* 处理开启关闭状态 */ - if ($('.joe_header__searchout').hasClass('active')) { - $('body').css('overflow', ''); - $('.joe_header__mask').removeClass('active slideout'); - $('.joe_header__searchout').removeClass('active'); - } else { - $('body').css('overflow', 'hidden'); - $('.joe_header__mask').addClass('active'); - $('.joe_header__searchout').addClass('active'); - } - }); - } + /* 小屏幕搜索框 */ + { + $(".joe_header__above-searchicon").on("click", function () { + /* 关闭侧边栏 */ + $(".joe_header__slideout").removeClass("active"); + /* 处理开启关闭状态 */ + if ($(".joe_header__searchout").hasClass("active")) { + $("body").css("overflow", ""); + $(".joe_header__mask").removeClass("active slideout"); + $(".joe_header__searchout").removeClass("active"); + } else { + $("body").css("overflow", "hidden"); + $(".joe_header__mask").addClass("active"); + $(".joe_header__searchout").addClass("active"); + } + }); + } - /* 点击遮罩层关闭 */ - { - $('.joe_header__mask').on('click', function () { - $('body').css('overflow', ''); - $('.joe_header__mask').removeClass('active slideout'); - $('.joe_header__searchout').removeClass('active'); - $('.joe_header__slideout').removeClass('active'); - }); - } + /* 点击遮罩层关闭 */ + { + $(".joe_header__mask").on("click", function () { + $("body").css("overflow", ""); + $(".joe_header__mask").removeClass("active slideout"); + $(".joe_header__searchout").removeClass("active"); + $(".joe_header__slideout").removeClass("active"); + }); + } - /* 移动端侧边栏菜单手风琴 */ - { - $('.joe_header__slideout-menu .current').parents('.panel-body').show().siblings('.panel').addClass('in'); - $('.joe_header__slideout-menu .panel').on('click', function () { - const panelBox = $(this).parent().parent(); - /* 清除全部内容 */ - panelBox.find('.panel').not($(this)).removeClass('in'); - panelBox.find('.panel-body').not($(this).siblings('.panel-body')).stop().hide('fast'); - /* 激活当前的内容 */ - $(this).toggleClass('in').siblings('.panel-body').stop().toggle('fast'); - }); - } + /* 移动端侧边栏菜单手风琴 */ + { + $(".joe_header__slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"); + $(".joe_header__slideout-menu .panel").on("click", function () { + const panelBox = $(this).parent().parent(); + /* 清除全部内容 */ + panelBox.find(".panel").not($(this)).removeClass("in"); + panelBox.find(".panel-body").not($(this).siblings(".panel-body")).stop().hide("fast"); + /* 激活当前的内容 */ + $(this).toggleClass("in").siblings(".panel-body").stop().toggle("fast"); + }); + } - /* 初始化网站运行时间 */ - { - const getRunTime = () => { - const birthDay = new Date(Joe.BIRTHDAY); - const today = +new Date(); - const timePast = today - birthDay.getTime(); - let day = timePast / (1000 * 24 * 60 * 60); - let dayPast = Math.floor(day); - let hour = (day - dayPast) * 24; - let hourPast = Math.floor(hour); - let minute = (hour - hourPast) * 60; - let minutePast = Math.floor(minute); - let second = (minute - minutePast) * 60; - let secondPast = Math.floor(second); - day = String(dayPast).padStart(2, 0); - hour = String(hourPast).padStart(2, 0); - minute = String(minutePast).padStart(2, 0); - second = String(secondPast).padStart(2, 0); - $('.joe_run__day').html(day); - $('.joe_run__hour').html(hour); - $('.joe_run__minute').html(minute); - $('.joe_run__second').html(second); - }; - if (Joe.BIRTHDAY && /(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2})\:(\d{1,2})\:(\d{1,2})/.test(Joe.BIRTHDAY)) { - getRunTime(); - setInterval(getRunTime, 1000); - } - } + /* 初始化网站运行时间 */ + { + const getRunTime = () => { + const birthDay = new Date(Joe.BIRTHDAY); + const today = +new Date(); + const timePast = today - birthDay.getTime(); + let day = timePast / (1000 * 24 * 60 * 60); + let dayPast = Math.floor(day); + let hour = (day - dayPast) * 24; + let hourPast = Math.floor(hour); + let minute = (hour - hourPast) * 60; + let minutePast = Math.floor(minute); + let second = (minute - minutePast) * 60; + let secondPast = Math.floor(second); + day = String(dayPast).padStart(2, 0); + hour = String(hourPast).padStart(2, 0); + minute = String(minutePast).padStart(2, 0); + second = String(secondPast).padStart(2, 0); + $(".joe_run__day").html(day); + $(".joe_run__hour").html(hour); + $(".joe_run__minute").html(minute); + $(".joe_run__second").html(second); + }; + if (Joe.BIRTHDAY && /(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2})\:(\d{1,2})\:(\d{1,2})/.test(Joe.BIRTHDAY)) { + getRunTime(); + setInterval(getRunTime, 1000); + } + } - /* 初始化表情功能 */ - { - if ($('.joe_owo__contain').length && $('.joe_owo__target').length) { - $.ajax({ - url: window.Joe.THEME_URL + 'assets/json/joe.owo.json', - dataType: 'json', - success(res) { - let barStr = ''; - let scrollStr = ''; - for (let key in res) { - const item = res[key]; - barStr += `
${key}
`; - scrollStr += ` + /* 初始化表情功能 */ + { + if ($(".joe_owo__contain").length && $(".joe_owo__target").length) { + $.ajax({ + url: window.Joe.THEME_URL + "assets/json/joe.owo.json", + dataType: "json", + success(res) { + let barStr = ""; + let scrollStr = ""; + for (let key in res) { + const item = res[key]; + barStr += `
${key}
`; + scrollStr += `
    - ${item.map(_ => `
  • ${key === '颜文字' ? `${_.icon}` : `${_.data}`}
  • `).join('')} + ${item.map((_) => `
  • ${key === "颜文字" ? `${_.icon}` : `${_.data}`}
  • `).join("")}
`; - } - $('.joe_owo__contain').html(` + } + $(".joe_owo__contain").html(`
OωO
${scrollStr}
${barStr}
`); - $(document).on('click', function () { - $('.joe_owo__contain .box').stop().slideUp('fast'); - }); - $('.joe_owo__contain .seat').on('click', function (e) { - e.stopPropagation(); - $(this).siblings('.box').stop().slideToggle('fast'); - }); - $('.joe_owo__contain .box .bar .item').on('click', function (e) { - e.stopPropagation(); - $(this).addClass('active').siblings().removeClass('active'); - const scrollIndx = '.joe_owo__contain .box .scroll[data-type="' + $(this).attr('data-type') + '"]'; - $(scrollIndx).show().siblings('.scroll').hide(); - }); - $('.joe_owo__contain .scroll .item').on('click', function () { - const text = $(this).attr('data-text'); - $('.joe_owo__target').insertContent(text); - }); - $('.joe_owo__contain .box .bar .item').first().click(); - } - }); - } - } + $(document).on("click", function () { + $(".joe_owo__contain .box").stop().slideUp("fast"); + }); + $(".joe_owo__contain .seat").on("click", function (e) { + e.stopPropagation(); + $(this).siblings(".box").stop().slideToggle("fast"); + }); + $(".joe_owo__contain .box .bar .item").on("click", function (e) { + e.stopPropagation(); + $(this).addClass("active").siblings().removeClass("active"); + const scrollIndx = '.joe_owo__contain .box .scroll[data-type="' + $(this).attr("data-type") + '"]'; + $(scrollIndx).show().siblings(".scroll").hide(); + }); + $(".joe_owo__contain .scroll .item").on("click", function () { + const text = $(this).attr("data-text"); + $(".joe_owo__target").insertContent(text); + }); + $(".joe_owo__contain .box .bar .item").first().click(); + }, + }); + } + } - /* 座右铭 */ - { - let motto = Joe.MOTTO; - if (!motto) motto = '有钱终成眷属,没钱亲眼目睹'; - if (motto.includes('http')) { - $.ajax({ - url: motto, - dataType: 'text', - success: res => $('.joe_motto').html(res) - }); - } else { - $('.joe_motto').html(motto); - } - } + /* 座右铭 */ + { + let motto = Joe.MOTTO; + if (!motto) motto = "有钱终成眷属,没钱亲眼目睹"; + if (motto.includes("http")) { + $.ajax({ + url: motto, + dataType: "text", + success: (res) => $(".joe_motto").html(res), + }); + } else { + $(".joe_motto").html(motto); + } + } - /* 头部滚动 */ - { - if (!window.Joe.IS_MOBILE) { - let flag = true; - const handleHeader = diffY => { - if (window.pageYOffset >= $('.joe_header').height() && diffY <= 0) { - if (flag) return; - $('.joe_header').addClass('active'); - $('.joe_aside .joe_aside__item:last-child').css('top', $('.joe_header').height() - 60 + 15); - flag = true; - } else { - if (!flag) return; - $('.joe_header').removeClass('active'); - $('.joe_aside .joe_aside__item:last-child').css('top', $('.joe_header').height() + 15); - flag = false; - } - }; - let Y = window.pageYOffset; - handleHeader(Y); - let _last = Date.now(); - document.addEventListener('scroll', () => { - let _now = Date.now(); - if (_now - _last > 15) { - handleHeader(Y - window.pageYOffset); - Y = window.pageYOffset; - } - _last = _now; - }); - } - } + /* 头部滚动 */ + { + if (!window.Joe.IS_MOBILE) { + let flag = true; + const handleHeader = (diffY) => { + if (window.pageYOffset >= $(".joe_header").height() && diffY <= 0) { + if (flag) return; + $(".joe_header").addClass("active"); + $(".joe_aside .joe_aside__item:last-child").css("top", $(".joe_header").height() - 60 + 15); + flag = true; + } else { + if (!flag) return; + $(".joe_header").removeClass("active"); + $(".joe_aside .joe_aside__item:last-child").css("top", $(".joe_header").height() + 15); + flag = false; + } + }; + let Y = window.pageYOffset; + handleHeader(Y); + let _last = Date.now(); + document.addEventListener("scroll", () => { + let _now = Date.now(); + if (_now - _last > 15) { + handleHeader(Y - window.pageYOffset); + Y = window.pageYOffset; + } + _last = _now; + }); + } + } }); diff --git a/assets/js/joe.global.min.js b/assets/js/joe.global.min.js index 897ea95..3c8dd54 100644 --- a/assets/js/joe.global.min.js +++ b/assets/js/joe.global.min.js @@ -1 +1,403 @@ -document.addEventListener("DOMContentLoaded",()=>{localStorage.getItem("data-night")?($(".joe_action_item.mode .icon-1").addClass("active"),$(".joe_action_item.mode .icon-2").removeClass("active")):($("html").removeAttr("data-night"),$(".joe_action_item.mode .icon-1").removeClass("active"),$(".joe_action_item.mode .icon-2").addClass("active")),$(".joe_action_item.mode").on("click",()=>{localStorage.getItem("data-night")?($(".joe_action_item.mode .icon-1").removeClass("active"),$(".joe_action_item.mode .icon-2").addClass("active"),$("html").removeAttr("data-night"),localStorage.removeItem("data-night")):($(".joe_action_item.mode .icon-1").addClass("active"),$(".joe_action_item.mode .icon-2").removeClass("active"),$("html").attr("data-night","night"),localStorage.setItem("data-night","night"))}),Joe.IS_MOBILE||"off"===Joe.DYNAMIC_BACKGROUND||!Joe.DYNAMIC_BACKGROUND||Joe.WALLPAPER_BACKGROUND_PC||$.getScript(window.Joe.THEME_URL+`assets/backdrop/${Joe.DYNAMIC_BACKGROUND}`),$(".joe_header__above-search .input").on("click",e=>{e.stopPropagation(),$(".joe_header__above-search .result").addClass("active")}),$(document).on("click",function(){$(".joe_header__above-search .result").removeClass("active")}),$(".joe_dropdown").each(function(e,t){const o=$(this).find(".joe_dropdown__menu"),a=$(t).attr("trigger")||"click",n=$(t).attr("placement")||$(this).height()||0;o.css("top",n),"hover"===a?$(this).hover(()=>$(this).addClass("active"),()=>$(this).removeClass("active")):($(this).on("click",function(e){$(this).toggleClass("active"),$(document).one("click",()=>$(this).removeClass("active")),e.stopPropagation()}),o.on("click",e=>e.stopPropagation()))});{let e=null;const t=()=>(document.documentElement.scrollTop||document.body.scrollTop)>300?$(".joe_action_item.scroll").addClass("active"):$(".joe_action_item.scroll").removeClass("active");t(),$(document).on("scroll",()=>{clearTimeout(e),e=setTimeout(t,80)}),$(".joe_action_item.scroll").on("click",()=>window.scrollTo({top:0,behavior:"smooth"}))}if($(".joe_aside__item.timelife").length){let e=[{title:"今日已经过去",endTitle:"小时",num:0,percent:"0%"},{title:"这周已经过去",endTitle:"天",num:0,percent:"0%"},{title:"本月已经过去",endTitle:"天",num:0,percent:"0%"},{title:"今年已经过去",endTitle:"个月",num:0,percent:"0%"}];{let t=+new Date,o=new Date((new Date).toLocaleDateString()).getTime(),a=(t-o)/1e3/60/60,n=a/24*100;e[0].num=parseInt(a),e[0].percent=parseInt(n)+"%"}{let t={0:7,1:1,2:2,3:3,4:4,5:5,6:6},o=t[(new Date).getDay()],a=o/7*100;e[1].num=parseInt(o),e[1].percent=parseInt(a)+"%"}{let t=(new Date).getFullYear(),o=(new Date).getDate(),a=(new Date).getMonth()+1,n=new Date(t,a,0).getDate(),i=o/n*100;e[2].num=o,e[2].percent=parseInt(i)+"%"}{let t=(new Date).getMonth()+1,o=t/12*100;e[3].num=t,e[3].percent=parseInt(o)+"%"}let t="";e.forEach((e,o)=>{t+=`\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t${e.title}\n\t\t\t\t\t\t\t\t${e.num}\n\t\t\t\t\t\t\t\t${e.endTitle}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
${e.percent}
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
`}),$(".joe_aside__item.timelife .joe_aside__item-contain").html(t)}if($(".joe_aside__item.weather").length){const e=$(".joe_aside__item.weather").attr("data-key"),t=$(".joe_aside__item.weather").attr("data-style"),o={1:"FFFFFF",2:"4A4A4A",3:"FFFFFF"};window.WIDGET={CONFIG:{layout:2,width:"220",height:"270",background:t,dataColor:o[t],language:"zh",key:e}},$.getScript("https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0")}if($(".joe_aside__item.tags").length){const e=[],t=["#F8D800","#0396FF","#EA5455","#7367F0","#32CCBC","#F6416C","#28C76F","#9F44D3","#F55555","#736EFE","#E96D71","#DE4313","#D939CD","#4C83FF","#F072B6","#C346C2","#5961F9","#FD6585","#465EFB","#FFC600","#FA742B","#5151E5","#BB4E75","#FF52E5","#49C628","#00EAFF","#F067B4","#F067B4","#ff9a9e","#00f2fe","#4facfe","#f093fb","#6fa3ef","#bc99c4","#46c47c","#f9bb3c","#e8583d","#f68e5f"],o=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e);$(".joe_aside__item-contain .list li").each((a,n)=>{e.push({label:$(n).attr("data-label"),url:$(n).attr("data-url"),target:"_blank",fontColor:t[o(0,t.length-1)],fontSize:15})}),$(".joe_aside__item-contain .tag").svg3DTagCloud({entries:e,width:220,height:220,radius:"65%",radiusMin:75,bgDraw:!1,fov:800,speed:.5,fontWeight:500})}if($(".joe_aside__item.flatterer").length){const e=["你昨天晚上又没回我信息,我却看见你的游戏在线,在我再一次孜孜不倦的骚扰你的情况下,你终于跟我说了一句最长的话“**你他妈是不是有病**”,我又陷入了沉思,这一定有什么含义,我想了很久,你竟然提到了我的妈妈,原来你已经想得那么长远了,想和我结婚见我的父母,我太感动了,真的。那你现在在干嘛,我好想你,我妈妈说她也很喜欢你。","今天我观战了一天你和别人打游戏,**你们玩的很开心**;我给你发了200多条消息,你说没流量就不回;晚上发说说没有人爱你,我连滚带爬评论了句有“我在”,你把我拉黑了,我给你打电话也无人接听。对不起,我不该打扰你,我求求你再给我一次当好友的机会吧!","我爸说再敢网恋就打断我的腿,幸好不是胳膊,这样我还能继续**和你打字聊天**,就算连胳膊也打断了,我的心里也会有你位置。","你说你情侣头像是一个人用的,空间上锁是因为你不喜欢玩空间,情侣空间是和闺蜜开的,找你连麦时你说你在忙工作,每次聊天你都说在忙,你真是一个**上进的好女孩**,你真好,我好喜欢你!","你跟他已经醒了吧?我今天捡垃圾挣了一百多,明天给你打过去。你快点休息吧,我明天叫你起床,给你点外卖买烟,给你点你最喜欢的奶茶。晚上我会继续去摆地摊的,你不用担心我,你床只有那么大睡不下三个。**你要好好照顾好自己,不要让他抢你被子**。我永远爱你!","她三天没回我的消息了,在我孜孜不倦地骚扰下她终于舍得回我“**nmsl**”,我想这一定是有什么含义吧,噢!我恍然大悟原来是**尼美舒利颗粒**,她知道我有关节炎让我吃尼美舒利颗粒,她还是关心我的,但是又不想显现的那么热情。天啊!她好高冷,我好像更喜欢她了!","你想我了吧?可以回我消息了吗?我买了万通筋骨贴,你**运动一个晚上腰很疼**吧?今晚早点回家,我炖了排骨汤,我永远在家等你。","昨晚你和朋友打了一晚上游戏,你破天荒的给我看了战绩,虽然我看不懂但是我相信你一定是最厉害的、最棒的。我给你发了好多消息夸你,告诉你我多崇拜你,你回了我一句“**啥B**”,我翻来覆去思考这是什么意思,Sha[傻],噢你是说我傻,那B就是Baby的意思了吧,原来你是在叫我**傻宝**,这么宠溺的语气,我竟一时不敢相信,其实你也是喜欢我的对吧。","今天我还是照常给你发消息,汇报日常工作,你终于回了我四个字:“**嗯嗯,好的。**”。你开始愿意敷衍我了,我太感动了,受宠若惊。我愿意天天给你发消息,就算你天天骂我,我也不觉得烦。","你昨天晚上又没回我的消息,在我孜孜不倦的骚扰下,你终于舍得回我了,你说“**滚**”,这其中一定有什么含义,我想了很久,滚是三点水,这代表你对我的思念也如**滚滚流水**一样汹涌,我感动哭了,不知道你现在在干嘛,我很想你。","听说你想要一套化妆品,我算了算,明天我去工地上**搬一天砖**,就可以拿到200块钱,再加上我上个月攒下来的零花钱,刚好给你买一套迪奥。","今天表白被拒绝了,她对我说能不能脱下裤子**撒泡尿照照自己**。当我脱下裤子,她咽了口水,说我们可以试一下。","刚从派出所出来,原因前几天14号情人节,我想送你礼物,我去偷东西的时候被抓了。我本来想反抗,警察说了一句老实点别动,我立刻就放弃了反抗,因为我记得你说过,你喜欢**老实人**。","疫情不能出门,现在是早上八点,你肯定饿了吧。我早起做好了早餐来到你小区,保安大哥不让进。我给你打了三个电话你终于接了“**有病啊,我还睡觉呢,你小区门口等着吧**”。啊,我高兴坏了!你终于愿意吃我做的早餐了,还让我等你,啊!啊!啊!好幸福噢!","我存了两个月钱,给你买了一双**北卡蓝**,你对我说一句“谢谢”,我好开心。这是你第一次对我说两个字,以前你都只对我说滚。今天晚上逛**闲鱼**,看到了你把我送你的北卡蓝发布上去了。我想你一定是在考验我,再次送给你,给你一个惊喜,我爱你。","昨天**你领完红包就把我删了**,我陷入久久地沉思。我想这其中一定有什么含义,原来你是在欲擒故纵,嫌我不够爱你。无理取闹的你变得更加可爱了,我会坚守我对你的爱的。你放心好啦!今天发工资了,发了1850,给你微信转了520,支付宝1314,还剩下16。给你发了很多消息你没回。剩下16块我在小卖部买了你爱吃的老坛酸菜牛肉面,给你寄过去了。希望你保护好食欲,我去上班了爱你~~","在保安亭内看完了最新一集的梨泰院,曾经多么倔强的朴世路因为伊瑞给张大熙跪下了,亭外的树也许感受到了**我的悲伤**,枯了。我连树都保护不了,怎么保护你,或许保安才是真的需要被保护的吧。我难受,我想你。over","难以言喻的下午。说不想你是假的,说爱你是真的。昨天他们骂**我是你的舔狗**,我不相信,因为我知道你肯定也是爱我的,你一定是在考验我对你的感情,只要我坚持下去你一定会被我的真诚所打动,加油!不过我要批评你一下,昨晚你说**去酒店跟人斗地主**,我寻思两个人也玩不了呀。算了,不想了,毕竟打牌是赌博行为,不太好。","明天就周六了我知道你不上班,但是我怕你睡懒觉不吃早饭饿坏自己。我早晨4点去菜市场买了新鲜活鸡**给你炖鸡汤**,阿姨给我用箱子装了起来,我骑上我280买的电动车哼着小调回家,心想你一定会被我感动的,箱子半路开了,鸡跑了,拐到了一个胡同里,凌晨4点的胡同还有穿超短裙和大叔聊天的美女,不禁感叹这个世界变了,她问我找什么,…………。对不起,我爱你","12点队长过来准时交班,出去的车辆按喇叭我也没听到,只因我在监控中看到了穿睡衣出来倒垃圾的你,**望你望的入神**不由的傻笑了起来,队长过来骂我扣了我一天工资。我委屈,想抱你。你送的泡面真好吃。","今天的我排位输了好多把,我将这些事情分享给你,但是你一个字都没有讲,我在想你是不是在忙?我头痛欲裂,终于在我给你发了几十条消息之后,你回了我一个“**脑子是不是有病?**”,原来你还是关心我的,看到这句话,我的脑子一下就不疼了,今天也是爱你的一天。","我存了半年的工资,给你买了一只LV,你对我说了一句“**你真好**”,我好开心,这是你第一次这么认可我,以前你都只对我说滚。今天晚上逛闲鱼,看到你把我送你的LV发布上去了。我想,你一定是在考验我,于是我用借呗里的钱把它买了下来,再次送给你,给你一个惊喜,我爱你。","其实我每月工资6000,但我只给你转2000,你以为我给你了全部。才不是,我一共舔了3个啦,**我要舔的雨露均沾**,才不会把你当成唯一。","昨天你把我拉黑了,我看着红色感叹号陷入了久久的沉思,我想这其中一定有什么含义?红色红色?我明白了!红色代表热情,你对我很热情,你想和我结婚,我愿意。","今天你问我借了两千块钱,说要做个手术,你果然还是爱我的,**不是我的孩子,你不要**。 ","中午你无故扇了我一巴掌,我握着你的手说“手怎么这么凉,都怪我没有照顾好你,一定要更加对你好”。","我给你打了几通电话,你终于接了。听到了**你发出啊啊啊啊的声音**,你说你肚子痛,我想你一定是很难受吧。电话还有个男的对你说“来换个姿势”,一定是**在做理疗**了。期待你早日康复,我好担心。","昨天晚上好冷,本来以为街上没人,结果刚刚**偷电动车**的时候被抓了,本来想反抗,但警察说了一句老实点别动,我立刻就放弃了抵抗,因为我记得你说过,你喜欢**老实人**。","找你连麦时你说你在忙工作,每次聊天你都说在忙,你真是一个**上进的好女孩**,你真好,发现我越来越喜欢这样优秀的你。","你从来没说过爱我,聊天记录搜索了一下“爱”,唯一的一条是:**你好像乡村爱情里的刘能啊**。","今天好开心啊,和你一起在峡谷嬉戏,打完一波团战之后看到你在打大龙,残血的我跳过去直接被龙爪拍死,但这一刻我觉得好浪漫,**死在你的脚旁边,这是我离你最近的一次**。","哥们,求你和她说句话吧,这样她就不会那么难过了。","今天你把我的微信拉黑了,这下我终于解放了!以前我总担心太多消息会打扰你,现在我终于不用顾忌,不管我怎么给你发消息,都不会让你不开心了。等我**攒够5201314条**我就拿给你看,你一定会震惊得说不出话然后哭着说会爱我一辈子。哈哈。","昨天你把我删了,我陷入了久久的沉思 。我想这其中一定有什么含义,你应该是欲擒故纵吧,嫌我不够爱你。突然觉得**无理取闹的你变得更加可爱**了,我会坚守我对你的爱的 你放心好啦!这么一想,突然对我俩的未来更有期望了呢。","今天上班不是太忙,百无聊赖,又翻出了你的相片,看了又看。今天是我认识你的第302天,也是我爱你的第302天,可是这些你并不知道,也许**你知道了,也不会在意**吧。 此刻的我好想你! ","今天你跟我说我很丑,让我不要骚扰你了。我听了很高兴,小说里的主角都像你这样,最开始表现的很厌恶,但最后**总会被我的真心打动**。你现在有多讨厌我,以后就会有多爱我。嘻嘻。","我坐在窗边给你发了99条消息,你终于肯回我了,你说“**发你妈啊**”,我一下子就哭了。原来努力真的有用,你已经开始考虑想见我的妈妈了,你也是挺喜欢我的。","刚才我找你说话,你回了一个滚,我陷入了沉思,你还是如此的关心我,知道我腿受伤了,让我这样走,好感动!看来你还是爱我的!","今天下雨了,我去你公司接你下班。看见我你不耐烦的说“**烦不烦啊,不要再找我了**”,一头冲进雨里就跑开了。我心里真高兴啊,你宁愿自己淋雨,都不愿让我也淋湿一点,你果然还是爱我的。","晚上和你聊天,10点钟不到,你就说“**困了,去睡觉了**”。现在凌晨1点钟,看到你给他的朋友圈点赞评论,约他明天去吃火锅,一定是你微信被盗了吧。","今天我主动给你发了游戏邀请,邀请你和我单挑安琪拉,虽然我安琪拉很菜,可是为了和你打游戏,我还是毅然决然给你发了邀请。你说你不接受,你在打其他游戏。联想到我自己很菜,我突然明白,原来你还是在乎我的,只是不想一遍遍连招一套的在泉水送我走。我再一次感动哭了,因此,我好像更喜欢你了,你可真是一个宝藏男孩!","你的头像是一个女孩子左手边牵着一条秋田犬,犬=狗,而**我是一条舔狗**。是不是代表你的小手在牵着我呢?","今天发工资了,我一个月工资3000,你猜我会给你多少,是不是觉得我会给你2500,自己留500吃饭?你想多了,我3000都给你,因为厂里包吃包住。","昨天就为你充了710点卷,虽然知道你不会玩不知去向,但你说好看,你刚才说小号想要还想要一个,爱你的我还是满心欢喜的把剩下的100元伙食费又给你充了710,然后看到你小号并没有买,而是你送给了你的一个弟弟,你对弟弟真好,好有爱心,我感觉对你陷得很深了。","今天我给你发消息,你回复我“**nmsl**”,我想了半天才知道你是在夸我,原来是**你美死了**,你嘴真甜,我爱你。","你说你想买口红,今天我去了叔叔的口罩厂做了一天的打包。拿到了两百块钱,加上我这几天**省下的钱刚好能给你买一根小金条**。即没有给我自己剩下一分钱,但你不用担心,因为厂里包吃包住。对了打包的时候,满脑子都是你,想着你哪天突然就接受我的橄榄枝了呢。而且今天我很棒呢,主管表扬我很能干,其实也有你的功劳啦,是你给了我无穷的力量。今天我比昨天多想你一点,比明天少想你一点。","在我一如既往的每天跟她问早安的时候,她今天终于回我了。我激动地问她我是不是今天第一个跟她说话的人,她说不是,是**她男朋友把她叫起来退房**的。","听说你朋友说今天出门了,我打扮成精神小伙来找你,没想到你竟然对我说“**给我爬,别过来**”我当场就哭了,原来真心真的会感动人,你一定是知道,穿豆豆鞋走路脚会很累,让我爬是因为这样不会累着脚,其实你是喜欢我的吧","今天把你的备注改成了「**对方正在输入...**」,这样我就知道你不是不想回我,刚又给你发了消息,看到你在思考怎么回我,我就知道你和我一样,心里有我。","今天在楼上窗户上看见你和他在公园里接吻,我看见哭了出来,并打电话给你,想问问你为什么?但你说怎么了,声音是那么好听。于是我说“**以后你和他接吻的时候,能不能用我送给你的口红啊?**”","我退了无关紧要的群,唯独这个群我没有退,因为这里有一个对我来说很特别的女孩子,我们不是好友,**我每天只能通过群名片看看她**,虽然一张照片也看不到,我也知足了,我不敢说她的名字,但我知道她是群里面最美的女孩子,她说我们这样会距离产生美~ 我想想发现她说的挺对的,我心里很开心。","今天早上我告诉你我想你了,你没理我。今天中午我给你打电话,你不接,打第二个你就关机。晚上我在你公司楼下等你,你对我说的第一句话就是滚“**滚,别烦我,别浪费时间了**”,我真的好感动,你居然为我考虑了,怕我浪费时间。呜呜呜,这是我爱你的第74天。","我坐在窗边给你发了99条消息,你终于肯回我了你说“**发你妈啊**”,我一下子就哭了,原来努力真的有用,你已经开始考虑想见我的妈妈了,你其实也是挺喜欢我的。","你一个小时没回我的消息,在我孜孜不倦地骚扰下你终于舍得回我了“**在做爱**”,这其中一定有什么含义,我想了很久,“在做爱”这简简单单的三个字肯定是三句话,分别是**我在忙、做你女朋友、我爱你**,想到这里我不禁流下了眼泪,我这么长时间的喜欢没有白费,不知道你现在忙干嘛,但我很想你。","最近我暗恋的女生每天都和不同的男生约会,我想总有一天会轮到我,我问她什么时候能见见我?她说**下辈子吧**。她真好,下辈子还要和我在一起。","你好像从来没有对我说过晚安,我在我们的聊天记录里搜索了关键字:“晚安”,你说过一次:**我早晚安排人弄死你**。"],t=(e,t)=>(e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e),o=()=>{$(".joe_aside__item.flatterer .content").html(e[t(0,e.length-1)].replace(/\*\*(.*?)\*\*/g,"$1")),$(".joe_aside__item.flatterer .content").attr("class","content type"+t(1,6))};o(),$(".joe_aside__item.flatterer .change").on("click",()=>o())}if("off"!==Joe.LIVE2D&&Joe.LIVE2D&&$.getScript("https://cdn.jsdelivr.net/npm/live2d-widget@3.1.4/lib/L2Dwidget.min.js",()=>{L2Dwidget.init({model:{jsonPath:Joe.LIVE2D,scale:1},mobile:{show:!1},display:{position:"right",width:160,height:200,hOffset:70,vOffset:0}})}),$(".joe_comment").length&&$(".joe_comment__respond-type .item").on("click",function(){$(this).addClass("active").siblings().removeClass("active"),"draw"===$(this).attr("data-type")?($(".joe_comment__respond-form .body .draw").show().siblings().hide(),$("#joe_comment_draw").prop("width",$(".joe_comment__respond-form .body").width()),$(".joe_comment__respond-form").attr("data-type","draw")):($(".joe_comment__respond-form .body .text").show().siblings().hide(),$(".joe_comment__respond-form").attr("data-type","text"))}),$("#joe_comment_draw").length&&(window.sketchpad=new Sketchpad({element:"#joe_comment_draw",height:300,penSize:5,color:"303133"}),$(".joe_comment__respond-form .body .draw .icon-undo").on("click",()=>window.sketchpad.undo()),$(".joe_comment__respond-form .body .draw .icon-animate").on("click",()=>window.sketchpad.animate(10)),$(".joe_comment__respond-form .body .draw .line li").on("click",function(){window.sketchpad.penSize=$(this).attr("data-line"),$(this).addClass("active").siblings().removeClass("active")}),$(".joe_comment__respond-form .body .draw .color li").on("click",function(){window.sketchpad.color=$(this).attr("data-color"),$(this).addClass("active").siblings().removeClass("active")})),$(".joe_comment__respond").length){const e=$(".joe_comment__respond");$(".joe_comment__reply").on("click",function(){const t=$(this).attr("data-coid"),o=$("#"+$(this).attr("data-id"));e.find(".joe_comment__respond-form").attr("data-coid",t),o.append(e),$(".joe_comment__respond-type .item[data-type='text']").click(),$(".joe_comment__cancle").show(),window.scrollTo({top:o.offset().top-$(".joe_header").height()-15,behavior:"smooth"})}),$(".joe_comment__cancle").on("click",function(){e.find(".joe_comment__respond-form").removeAttr("data-coid"),$(".joe_comment__cancle").hide(),$(".joe_comment__title").after(e),$(".joe_comment__respond-type .item[data-type='text']").click(),window.scrollTo({top:$(".joe_comment").offset().top-$(".joe_header").height()-15,behavior:"smooth"})})}if($(".joe_comment").length){let e=!1;$(".joe_comment__respond-form").on("submit",function(t){t.preventDefault();const o=$(".joe_comment__respond-form").attr("action")+"?time="+ +new Date,a=$(".joe_comment__respond-form").attr("data-type"),n=$(".joe_comment__respond-form").attr("data-coid"),i=$(".joe_comment__respond-form .head input[name='author']").val(),s=$(".joe_comment__respond-form input[name='_']").val(),c=$(".joe_comment__respond-form .head input[name='mail']").val(),r=$(".joe_comment__respond-form .head input[name='url']").val();let d=$(".joe_comment__respond-form .body textarea[name='text']").val();if(""===i.trim())return Qmsg.info("请输入昵称!");if(!/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(c))return Qmsg.info("请输入正确的邮箱!");if("text"===a&&""===d.trim())return Qmsg.info("请输入评论内容!");if("draw"===a){const e=$("#joe_comment_draw")[0].toDataURL("image/webp",.1);d="{!{"+e+"}!} "}e||(e=!0,$(".joe_comment__respond-form .foot .submit button").html("发送中..."),$.ajax({url:o,type:"POST",data:{author:i,mail:c,text:d,parent:n,url:r,_:s},dataType:"text",success(t){let o=[],a="";o=$(t).contents(),Array.from(o).forEach(e=>{"container"===e.parentNode.className&&(a=e)}),/Joe/.test(t)?window.location.reload():(Qmsg.warning(a.textContent.trim()||""),e=!1,$(".joe_comment__respond-form .foot .submit button").html("发表评论"))},error(){e=!1,$(".joe_comment__respond-form .foot .submit button").html("发表评论"),Qmsg.warning("发送失败!请刷新重试!")}}))})}if($(".comment-list__item .term .content .user .author a").each((e,t)=>$(t).attr("target","_blank")),$(".joe_comment .joe_pagination a").each((e,t)=>{const o=$(t).attr("href");o&&o.includes("#")&&$(t).attr("href",o.replace("#comments","?scroll=joe_comment"))}),Joe.DOCUMENT_TITLE){const e=document.title;document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState?document.title=Joe.DOCUMENT_TITLE:document.title=e})}$(".joe_header__above-slideicon").on("click",function(){$(".joe_header__searchout").removeClass("active"),$(".joe_header__slideout").hasClass("active")?($("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__slideout").removeClass("active")):($("body").css("overflow","hidden"),$(".joe_header__mask").addClass("active slideout"),$(".joe_header__slideout").addClass("active"))}),$(".joe_header__above-searchicon").on("click",function(){$(".joe_header__slideout").removeClass("active"),$(".joe_header__searchout").hasClass("active")?($("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__searchout").removeClass("active")):($("body").css("overflow","hidden"),$(".joe_header__mask").addClass("active"),$(".joe_header__searchout").addClass("active"))}),$(".joe_header__mask").on("click",function(){$("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__searchout").removeClass("active"),$(".joe_header__slideout").removeClass("active")}),$(".joe_header__slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"),$(".joe_header__slideout-menu .panel").on("click",function(){const e=$(this).parent().parent();e.find(".panel").not($(this)).removeClass("in"),e.find(".panel-body").not($(this).siblings(".panel-body")).stop().hide("fast"),$(this).toggleClass("in").siblings(".panel-body").stop().toggle("fast")});{const e=()=>{const e=new Date(Joe.BIRTHDAY),t=+new Date,o=t-e.getTime();let a=o/864e5,n=Math.floor(a),i=24*(a-n),s=Math.floor(i),c=60*(i-s),r=Math.floor(c),d=60*(c-r),_=Math.floor(d);a=String(n).padStart(2,0),i=String(s).padStart(2,0),c=String(r).padStart(2,0),d=String(_).padStart(2,0),$(".joe_run__day").html(a),$(".joe_run__hour").html(i),$(".joe_run__minute").html(c),$(".joe_run__second").html(d)};Joe.BIRTHDAY&&/(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2})\:(\d{1,2})\:(\d{1,2})/.test(Joe.BIRTHDAY)&&(e(),setInterval(e,1e3))}$(".joe_owo__contain").length&&$(".joe_owo__target").length&&$.ajax({url:window.Joe.THEME_URL+"assets/json/joe.owo.json",dataType:"json",success(e){let t="",o="";for(let a in e){const n=e[a];t+=`
${a}
`,o+=`\n
    \n\t\t\t\t\t\t\t\t${n.map(e=>`
  • ${"颜文字"===a?`${e.icon}`:`${e.data}`}
  • `).join("")}\n
\n `}$(".joe_owo__contain").html(`\n
OωO
\n
\n ${o}\n
${t}
\n
\n `),$(document).on("click",function(){$(".joe_owo__contain .box").stop().slideUp("fast")}),$(".joe_owo__contain .seat").on("click",function(e){e.stopPropagation(),$(this).siblings(".box").stop().slideToggle("fast")}),$(".joe_owo__contain .box .bar .item").on("click",function(e){e.stopPropagation(),$(this).addClass("active").siblings().removeClass("active");const t='.joe_owo__contain .box .scroll[data-type="'+$(this).attr("data-type")+'"]';$(t).show().siblings(".scroll").hide()}),$(".joe_owo__contain .scroll .item").on("click",function(){const e=$(this).attr("data-text");$(".joe_owo__target").insertContent(e)}),$(".joe_owo__contain .box .bar .item").first().click()}});{let e=Joe.MOTTO;e||(e="有钱终成眷属,没钱亲眼目睹"),e.includes("http")?$.ajax({url:e,dataType:"text",success:e=>$(".joe_motto").html(e)}):$(".joe_motto").html(e)}if(!window.Joe.IS_MOBILE){let e=!0;const t=t=>{if(window.pageYOffset>=$(".joe_header").height()&&t<=0){if(e)return;$(".joe_header").addClass("active"),$(".joe_aside .joe_aside__item:last-child").css("top",$(".joe_header").height()-60+15),e=!0}else{if(!e)return;$(".joe_header").removeClass("active"),$(".joe_aside .joe_aside__item:last-child").css("top",$(".joe_header").height()+15),e=!1}};let o=window.pageYOffset;t(o);let a=Date.now();document.addEventListener("scroll",()=>{let e=Date.now();e-a>15&&(t(o-window.pageYOffset),o=window.pageYOffset),a=e})}}); \ No newline at end of file +document.addEventListener("DOMContentLoaded", () => { + localStorage.getItem("data-night") + ? ($(".joe_action_item.mode .icon-1").addClass("active"), $(".joe_action_item.mode .icon-2").removeClass("active")) + : ($("html").removeAttr("data-night"), $(".joe_action_item.mode .icon-1").removeClass("active"), $(".joe_action_item.mode .icon-2").addClass("active")), + $(".joe_action_item.mode").on("click", () => { + localStorage.getItem("data-night") + ? ($(".joe_action_item.mode .icon-1").removeClass("active"), $(".joe_action_item.mode .icon-2").addClass("active"), $("html").removeAttr("data-night"), localStorage.removeItem("data-night")) + : ($(".joe_action_item.mode .icon-1").addClass("active"), $(".joe_action_item.mode .icon-2").removeClass("active"), $("html").attr("data-night", "night"), localStorage.setItem("data-night", "night")); + }), + Joe.IS_MOBILE || "off" === Joe.DYNAMIC_BACKGROUND || !Joe.DYNAMIC_BACKGROUND || Joe.WALLPAPER_BACKGROUND_PC || $.getScript(window.Joe.THEME_URL + `assets/backdrop/${Joe.DYNAMIC_BACKGROUND}`), + $(".joe_header__above-search .input").on("click", (e) => { + e.stopPropagation(), $(".joe_header__above-search .result").addClass("active"); + }), + $(document).on("click", function () { + $(".joe_header__above-search .result").removeClass("active"); + }), + $(".joe_dropdown").each(function (e, t) { + const o = $(this).find(".joe_dropdown__menu"), + a = $(t).attr("trigger") || "click", + n = $(t).attr("placement") || $(this).height() || 0; + o.css("top", n), + "hover" === a + ? $(this).hover( + () => $(this).addClass("active"), + () => $(this).removeClass("active") + ) + : ($(this).on("click", function (e) { + $(this).toggleClass("active"), $(document).one("click", () => $(this).removeClass("active")), e.stopPropagation(); + }), + o.on("click", (e) => e.stopPropagation())); + }); + { + let e = null; + const t = () => ((document.documentElement.scrollTop || document.body.scrollTop) > 300 ? $(".joe_action_item.scroll").addClass("active") : $(".joe_action_item.scroll").removeClass("active")); + t(), + $(document).on("scroll", () => { + clearTimeout(e), (e = setTimeout(t, 80)); + }), + $(".joe_action_item.scroll").on("click", () => window.scrollTo({ top: 0, behavior: "smooth" })); + } + if ($(".joe_aside__item.timelife").length) { + let e = [ + { title: "今日已经过去", endTitle: "小时", num: 0, percent: "0%" }, + { title: "这周已经过去", endTitle: "天", num: 0, percent: "0%" }, + { title: "本月已经过去", endTitle: "天", num: 0, percent: "0%" }, + { title: "今年已经过去", endTitle: "个月", num: 0, percent: "0%" }, + ]; + { + let t = +new Date(), + o = new Date(new Date().toLocaleDateString()).getTime(), + a = (t - o) / 1e3 / 60 / 60, + n = (a / 24) * 100; + (e[0].num = parseInt(a)), (e[0].percent = parseInt(n) + "%"); + } + { + let t = { 0: 7, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6 }, + o = t[new Date().getDay()], + a = (o / 7) * 100; + (e[1].num = parseInt(o)), (e[1].percent = parseInt(a) + "%"); + } + { + let t = new Date().getFullYear(), + o = new Date().getDate(), + a = new Date().getMonth() + 1, + n = new Date(t, a, 0).getDate(), + i = (o / n) * 100; + (e[2].num = o), (e[2].percent = parseInt(i) + "%"); + } + { + let t = new Date().getMonth() + 1, + o = (t / 12) * 100; + (e[3].num = t), (e[3].percent = parseInt(o) + "%"); + } + let t = ""; + e.forEach((e, o) => { + t += `\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t${e.title}\n\t\t\t\t\t\t\t\t${e.num}\n\t\t\t\t\t\t\t\t${e.endTitle}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
${e.percent}
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
`; + }), + $(".joe_aside__item.timelife .joe_aside__item-contain").html(t); + } + if ($(".joe_aside__item.weather").length) { + const e = $(".joe_aside__item.weather").attr("data-key"), + t = $(".joe_aside__item.weather").attr("data-style"), + o = { 1: "FFFFFF", 2: "4A4A4A", 3: "FFFFFF" }; + (window.WIDGET = { CONFIG: { layout: 2, width: "220", height: "270", background: t, dataColor: o[t], language: "zh", key: e } }), + $.getScript("https://widget.qweather.net/standard/static/js/he-standard-common.js?v=2.0"); + } + if ($(".joe_aside__item.tags").length) { + const e = [], + t = [ + "#F8D800", + "#0396FF", + "#EA5455", + "#7367F0", + "#32CCBC", + "#F6416C", + "#28C76F", + "#9F44D3", + "#F55555", + "#736EFE", + "#E96D71", + "#DE4313", + "#D939CD", + "#4C83FF", + "#F072B6", + "#C346C2", + "#5961F9", + "#FD6585", + "#465EFB", + "#FFC600", + "#FA742B", + "#5151E5", + "#BB4E75", + "#FF52E5", + "#49C628", + "#00EAFF", + "#F067B4", + "#F067B4", + "#ff9a9e", + "#00f2fe", + "#4facfe", + "#f093fb", + "#6fa3ef", + "#bc99c4", + "#46c47c", + "#f9bb3c", + "#e8583d", + "#f68e5f", + ], + o = (e, t) => ((e = Math.ceil(e)), (t = Math.floor(t)), Math.floor(Math.random() * (t - e + 1)) + e); + $(".joe_aside__item-contain .list li").each((a, n) => { + e.push({ label: $(n).attr("data-label"), url: $(n).attr("data-url"), target: "_blank", fontColor: t[o(0, t.length - 1)], fontSize: 15 }); + }), + $(".joe_aside__item-contain .tag").svg3DTagCloud({ entries: e, width: 220, height: 220, radius: "65%", radiusMin: 75, bgDraw: !1, fov: 800, speed: 0.5, fontWeight: 500 }); + } + if ($(".joe_aside__item.flatterer").length) { + const e = [ + "你昨天晚上又没回我信息,我却看见你的游戏在线,在我再一次孜孜不倦的骚扰你的情况下,你终于跟我说了一句最长的话“**你他妈是不是有病**”,我又陷入了沉思,这一定有什么含义,我想了很久,你竟然提到了我的妈妈,原来你已经想得那么长远了,想和我结婚见我的父母,我太感动了,真的。那你现在在干嘛,我好想你,我妈妈说她也很喜欢你。", + "今天我观战了一天你和别人打游戏,**你们玩的很开心**;我给你发了200多条消息,你说没流量就不回;晚上发说说没有人爱你,我连滚带爬评论了句有“我在”,你把我拉黑了,我给你打电话也无人接听。对不起,我不该打扰你,我求求你再给我一次当好友的机会吧!", + "我爸说再敢网恋就打断我的腿,幸好不是胳膊,这样我还能继续**和你打字聊天**,就算连胳膊也打断了,我的心里也会有你位置。", + "你说你情侣头像是一个人用的,空间上锁是因为你不喜欢玩空间,情侣空间是和闺蜜开的,找你连麦时你说你在忙工作,每次聊天你都说在忙,你真是一个**上进的好女孩**,你真好,我好喜欢你!", + "你跟他已经醒了吧?我今天捡垃圾挣了一百多,明天给你打过去。你快点休息吧,我明天叫你起床,给你点外卖买烟,给你点你最喜欢的奶茶。晚上我会继续去摆地摊的,你不用担心我,你床只有那么大睡不下三个。**你要好好照顾好自己,不要让他抢你被子**。我永远爱你!", + "她三天没回我的消息了,在我孜孜不倦地骚扰下她终于舍得回我“**nmsl**”,我想这一定是有什么含义吧,噢!我恍然大悟原来是**尼美舒利颗粒**,她知道我有关节炎让我吃尼美舒利颗粒,她还是关心我的,但是又不想显现的那么热情。天啊!她好高冷,我好像更喜欢她了!", + "你想我了吧?可以回我消息了吗?我买了万通筋骨贴,你**运动一个晚上腰很疼**吧?今晚早点回家,我炖了排骨汤,我永远在家等你。", + "昨晚你和朋友打了一晚上游戏,你破天荒的给我看了战绩,虽然我看不懂但是我相信你一定是最厉害的、最棒的。我给你发了好多消息夸你,告诉你我多崇拜你,你回了我一句“**啥B**”,我翻来覆去思考这是什么意思,Sha[傻],噢你是说我傻,那B就是Baby的意思了吧,原来你是在叫我**傻宝**,这么宠溺的语气,我竟一时不敢相信,其实你也是喜欢我的对吧。", + "今天我还是照常给你发消息,汇报日常工作,你终于回了我四个字:“**嗯嗯,好的。**”。你开始愿意敷衍我了,我太感动了,受宠若惊。我愿意天天给你发消息,就算你天天骂我,我也不觉得烦。", + "你昨天晚上又没回我的消息,在我孜孜不倦的骚扰下,你终于舍得回我了,你说“**滚**”,这其中一定有什么含义,我想了很久,滚是三点水,这代表你对我的思念也如**滚滚流水**一样汹涌,我感动哭了,不知道你现在在干嘛,我很想你。", + "听说你想要一套化妆品,我算了算,明天我去工地上**搬一天砖**,就可以拿到200块钱,再加上我上个月攒下来的零花钱,刚好给你买一套迪奥。", + "今天表白被拒绝了,她对我说能不能脱下裤子**撒泡尿照照自己**。当我脱下裤子,她咽了口水,说我们可以试一下。", + "刚从派出所出来,原因前几天14号情人节,我想送你礼物,我去偷东西的时候被抓了。我本来想反抗,警察说了一句老实点别动,我立刻就放弃了反抗,因为我记得你说过,你喜欢**老实人**。", + "疫情不能出门,现在是早上八点,你肯定饿了吧。我早起做好了早餐来到你小区,保安大哥不让进。我给你打了三个电话你终于接了“**有病啊,我还睡觉呢,你小区门口等着吧**”。啊,我高兴坏了!你终于愿意吃我做的早餐了,还让我等你,啊!啊!啊!好幸福噢!", + "我存了两个月钱,给你买了一双**北卡蓝**,你对我说一句“谢谢”,我好开心。这是你第一次对我说两个字,以前你都只对我说滚。今天晚上逛**闲鱼**,看到了你把我送你的北卡蓝发布上去了。我想你一定是在考验我,再次送给你,给你一个惊喜,我爱你。", + "昨天**你领完红包就把我删了**,我陷入久久地沉思。我想这其中一定有什么含义,原来你是在欲擒故纵,嫌我不够爱你。无理取闹的你变得更加可爱了,我会坚守我对你的爱的。你放心好啦!今天发工资了,发了1850,给你微信转了520,支付宝1314,还剩下16。给你发了很多消息你没回。剩下16块我在小卖部买了你爱吃的老坛酸菜牛肉面,给你寄过去了。希望你保护好食欲,我去上班了爱你~~", + "在保安亭内看完了最新一集的梨泰院,曾经多么倔强的朴世路因为伊瑞给张大熙跪下了,亭外的树也许感受到了**我的悲伤**,枯了。我连树都保护不了,怎么保护你,或许保安才是真的需要被保护的吧。我难受,我想你。over", + "难以言喻的下午。说不想你是假的,说爱你是真的。昨天他们骂**我是你的舔狗**,我不相信,因为我知道你肯定也是爱我的,你一定是在考验我对你的感情,只要我坚持下去你一定会被我的真诚所打动,加油!不过我要批评你一下,昨晚你说**去酒店跟人斗地主**,我寻思两个人也玩不了呀。算了,不想了,毕竟打牌是赌博行为,不太好。", + "明天就周六了我知道你不上班,但是我怕你睡懒觉不吃早饭饿坏自己。我早晨4点去菜市场买了新鲜活鸡**给你炖鸡汤**,阿姨给我用箱子装了起来,我骑上我280买的电动车哼着小调回家,心想你一定会被我感动的,箱子半路开了,鸡跑了,拐到了一个胡同里,凌晨4点的胡同还有穿超短裙和大叔聊天的美女,不禁感叹这个世界变了,她问我找什么,…………。对不起,我爱你", + "12点队长过来准时交班,出去的车辆按喇叭我也没听到,只因我在监控中看到了穿睡衣出来倒垃圾的你,**望你望的入神**不由的傻笑了起来,队长过来骂我扣了我一天工资。我委屈,想抱你。你送的泡面真好吃。", + "今天的我排位输了好多把,我将这些事情分享给你,但是你一个字都没有讲,我在想你是不是在忙?我头痛欲裂,终于在我给你发了几十条消息之后,你回了我一个“**脑子是不是有病?**”,原来你还是关心我的,看到这句话,我的脑子一下就不疼了,今天也是爱你的一天。", + "我存了半年的工资,给你买了一只LV,你对我说了一句“**你真好**”,我好开心,这是你第一次这么认可我,以前你都只对我说滚。今天晚上逛闲鱼,看到你把我送你的LV发布上去了。我想,你一定是在考验我,于是我用借呗里的钱把它买了下来,再次送给你,给你一个惊喜,我爱你。", + "其实我每月工资6000,但我只给你转2000,你以为我给你了全部。才不是,我一共舔了3个啦,**我要舔的雨露均沾**,才不会把你当成唯一。", + "昨天你把我拉黑了,我看着红色感叹号陷入了久久的沉思,我想这其中一定有什么含义?红色红色?我明白了!红色代表热情,你对我很热情,你想和我结婚,我愿意。", + "今天你问我借了两千块钱,说要做个手术,你果然还是爱我的,**不是我的孩子,你不要**。 ", + "中午你无故扇了我一巴掌,我握着你的手说“手怎么这么凉,都怪我没有照顾好你,一定要更加对你好”。", + "我给你打了几通电话,你终于接了。听到了**你发出啊啊啊啊的声音**,你说你肚子痛,我想你一定是很难受吧。电话还有个男的对你说“来换个姿势”,一定是**在做理疗**了。期待你早日康复,我好担心。", + "昨天晚上好冷,本来以为街上没人,结果刚刚**偷电动车**的时候被抓了,本来想反抗,但警察说了一句老实点别动,我立刻就放弃了抵抗,因为我记得你说过,你喜欢**老实人**。", + "找你连麦时你说你在忙工作,每次聊天你都说在忙,你真是一个**上进的好女孩**,你真好,发现我越来越喜欢这样优秀的你。", + "你从来没说过爱我,聊天记录搜索了一下“爱”,唯一的一条是:**你好像乡村爱情里的刘能啊**。", + "今天好开心啊,和你一起在峡谷嬉戏,打完一波团战之后看到你在打大龙,残血的我跳过去直接被龙爪拍死,但这一刻我觉得好浪漫,**死在你的脚旁边,这是我离你最近的一次**。", + "哥们,求你和她说句话吧,这样她就不会那么难过了。", + "今天你把我的微信拉黑了,这下我终于解放了!以前我总担心太多消息会打扰你,现在我终于不用顾忌,不管我怎么给你发消息,都不会让你不开心了。等我**攒够5201314条**我就拿给你看,你一定会震惊得说不出话然后哭着说会爱我一辈子。哈哈。", + "昨天你把我删了,我陷入了久久的沉思 。我想这其中一定有什么含义,你应该是欲擒故纵吧,嫌我不够爱你。突然觉得**无理取闹的你变得更加可爱**了,我会坚守我对你的爱的 你放心好啦!这么一想,突然对我俩的未来更有期望了呢。", + "今天上班不是太忙,百无聊赖,又翻出了你的相片,看了又看。今天是我认识你的第302天,也是我爱你的第302天,可是这些你并不知道,也许**你知道了,也不会在意**吧。 此刻的我好想你! ", + "今天你跟我说我很丑,让我不要骚扰你了。我听了很高兴,小说里的主角都像你这样,最开始表现的很厌恶,但最后**总会被我的真心打动**。你现在有多讨厌我,以后就会有多爱我。嘻嘻。", + "我坐在窗边给你发了99条消息,你终于肯回我了,你说“**发你妈啊**”,我一下子就哭了。原来努力真的有用,你已经开始考虑想见我的妈妈了,你也是挺喜欢我的。", + "刚才我找你说话,你回了一个滚,我陷入了沉思,你还是如此的关心我,知道我腿受伤了,让我这样走,好感动!看来你还是爱我的!", + "今天下雨了,我去你公司接你下班。看见我你不耐烦的说“**烦不烦啊,不要再找我了**”,一头冲进雨里就跑开了。我心里真高兴啊,你宁愿自己淋雨,都不愿让我也淋湿一点,你果然还是爱我的。", + "晚上和你聊天,10点钟不到,你就说“**困了,去睡觉了**”。现在凌晨1点钟,看到你给他的朋友圈点赞评论,约他明天去吃火锅,一定是你微信被盗了吧。", + "今天我主动给你发了游戏邀请,邀请你和我单挑安琪拉,虽然我安琪拉很菜,可是为了和你打游戏,我还是毅然决然给你发了邀请。你说你不接受,你在打其他游戏。联想到我自己很菜,我突然明白,原来你还是在乎我的,只是不想一遍遍连招一套的在泉水送我走。我再一次感动哭了,因此,我好像更喜欢你了,你可真是一个宝藏男孩!", + "你的头像是一个女孩子左手边牵着一条秋田犬,犬=狗,而**我是一条舔狗**。是不是代表你的小手在牵着我呢?", + "今天发工资了,我一个月工资3000,你猜我会给你多少,是不是觉得我会给你2500,自己留500吃饭?你想多了,我3000都给你,因为厂里包吃包住。", + "昨天就为你充了710点卷,虽然知道你不会玩不知去向,但你说好看,你刚才说小号想要还想要一个,爱你的我还是满心欢喜的把剩下的100元伙食费又给你充了710,然后看到你小号并没有买,而是你送给了你的一个弟弟,你对弟弟真好,好有爱心,我感觉对你陷得很深了。", + "今天我给你发消息,你回复我“**nmsl**”,我想了半天才知道你是在夸我,原来是**你美死了**,你嘴真甜,我爱你。", + "你说你想买口红,今天我去了叔叔的口罩厂做了一天的打包。拿到了两百块钱,加上我这几天**省下的钱刚好能给你买一根小金条**。即没有给我自己剩下一分钱,但你不用担心,因为厂里包吃包住。对了打包的时候,满脑子都是你,想着你哪天突然就接受我的橄榄枝了呢。而且今天我很棒呢,主管表扬我很能干,其实也有你的功劳啦,是你给了我无穷的力量。今天我比昨天多想你一点,比明天少想你一点。", + "在我一如既往的每天跟她问早安的时候,她今天终于回我了。我激动地问她我是不是今天第一个跟她说话的人,她说不是,是**她男朋友把她叫起来退房**的。", + "听说你朋友说今天出门了,我打扮成精神小伙来找你,没想到你竟然对我说“**给我爬,别过来**”我当场就哭了,原来真心真的会感动人,你一定是知道,穿豆豆鞋走路脚会很累,让我爬是因为这样不会累着脚,其实你是喜欢我的吧", + "今天把你的备注改成了「**对方正在输入...**」,这样我就知道你不是不想回我,刚又给你发了消息,看到你在思考怎么回我,我就知道你和我一样,心里有我。", + "今天在楼上窗户上看见你和他在公园里接吻,我看见哭了出来,并打电话给你,想问问你为什么?但你说怎么了,声音是那么好听。于是我说“**以后你和他接吻的时候,能不能用我送给你的口红啊?**”", + "我退了无关紧要的群,唯独这个群我没有退,因为这里有一个对我来说很特别的女孩子,我们不是好友,**我每天只能通过群名片看看她**,虽然一张照片也看不到,我也知足了,我不敢说她的名字,但我知道她是群里面最美的女孩子,她说我们这样会距离产生美~ 我想想发现她说的挺对的,我心里很开心。", + "今天早上我告诉你我想你了,你没理我。今天中午我给你打电话,你不接,打第二个你就关机。晚上我在你公司楼下等你,你对我说的第一句话就是滚“**滚,别烦我,别浪费时间了**”,我真的好感动,你居然为我考虑了,怕我浪费时间。呜呜呜,这是我爱你的第74天。", + "我坐在窗边给你发了99条消息,你终于肯回我了你说“**发你妈啊**”,我一下子就哭了,原来努力真的有用,你已经开始考虑想见我的妈妈了,你其实也是挺喜欢我的。", + "你一个小时没回我的消息,在我孜孜不倦地骚扰下你终于舍得回我了“**在做爱**”,这其中一定有什么含义,我想了很久,“在做爱”这简简单单的三个字肯定是三句话,分别是**我在忙、做你女朋友、我爱你**,想到这里我不禁流下了眼泪,我这么长时间的喜欢没有白费,不知道你现在忙干嘛,但我很想你。", + "最近我暗恋的女生每天都和不同的男生约会,我想总有一天会轮到我,我问她什么时候能见见我?她说**下辈子吧**。她真好,下辈子还要和我在一起。", + "你好像从来没有对我说过晚安,我在我们的聊天记录里搜索了关键字:“晚安”,你说过一次:**我早晚安排人弄死你**。", + ], + t = (e, t) => ((e = Math.ceil(e)), (t = Math.floor(t)), Math.floor(Math.random() * (t - e + 1)) + e), + o = () => { + $(".joe_aside__item.flatterer .content").html(e[t(0, e.length - 1)].replace(/\*\*(.*?)\*\*/g, "$1")), $(".joe_aside__item.flatterer .content").attr("class", "content type" + t(1, 6)); + }; + o(), $(".joe_aside__item.flatterer .change").on("click", () => o()); + } + if ( + ("off" !== Joe.LIVE2D && + Joe.LIVE2D && + $.getScript("https://fastly.jsdelivr.net/npm/live2d-widget@3.1.4/lib/L2Dwidget.min.js", () => { + L2Dwidget.init({ model: { jsonPath: Joe.LIVE2D, scale: 1 }, mobile: { show: !1 }, display: { position: "right", width: 160, height: 200, hOffset: 70, vOffset: 0 } }); + }), + $(".joe_comment").length && + $(".joe_comment__respond-type .item").on("click", function () { + $(this).addClass("active").siblings().removeClass("active"), + "draw" === $(this).attr("data-type") + ? ($(".joe_comment__respond-form .body .draw").show().siblings().hide(), + $("#joe_comment_draw").prop("width", $(".joe_comment__respond-form .body").width()), + $(".joe_comment__respond-form").attr("data-type", "draw")) + : ($(".joe_comment__respond-form .body .text").show().siblings().hide(), $(".joe_comment__respond-form").attr("data-type", "text")); + }), + $("#joe_comment_draw").length && + ((window.sketchpad = new Sketchpad({ element: "#joe_comment_draw", height: 300, penSize: 5, color: "303133" })), + $(".joe_comment__respond-form .body .draw .icon-undo").on("click", () => window.sketchpad.undo()), + $(".joe_comment__respond-form .body .draw .icon-animate").on("click", () => window.sketchpad.animate(10)), + $(".joe_comment__respond-form .body .draw .line li").on("click", function () { + (window.sketchpad.penSize = $(this).attr("data-line")), $(this).addClass("active").siblings().removeClass("active"); + }), + $(".joe_comment__respond-form .body .draw .color li").on("click", function () { + (window.sketchpad.color = $(this).attr("data-color")), $(this).addClass("active").siblings().removeClass("active"); + })), + $(".joe_comment__respond").length) + ) { + const e = $(".joe_comment__respond"); + $(".joe_comment__reply").on("click", function () { + const t = $(this).attr("data-coid"), + o = $("#" + $(this).attr("data-id")); + e.find(".joe_comment__respond-form").attr("data-coid", t), + o.append(e), + $(".joe_comment__respond-type .item[data-type='text']").click(), + $(".joe_comment__cancle").show(), + window.scrollTo({ top: o.offset().top - $(".joe_header").height() - 15, behavior: "smooth" }); + }), + $(".joe_comment__cancle").on("click", function () { + e.find(".joe_comment__respond-form").removeAttr("data-coid"), + $(".joe_comment__cancle").hide(), + $(".joe_comment__title").after(e), + $(".joe_comment__respond-type .item[data-type='text']").click(), + window.scrollTo({ top: $(".joe_comment").offset().top - $(".joe_header").height() - 15, behavior: "smooth" }); + }); + } + if ($(".joe_comment").length) { + let e = !1; + $(".joe_comment__respond-form").on("submit", function (t) { + t.preventDefault(); + const o = $(".joe_comment__respond-form").attr("action") + "?time=" + +new Date(), + a = $(".joe_comment__respond-form").attr("data-type"), + n = $(".joe_comment__respond-form").attr("data-coid"), + i = $(".joe_comment__respond-form .head input[name='author']").val(), + s = $(".joe_comment__respond-form input[name='_']").val(), + c = $(".joe_comment__respond-form .head input[name='mail']").val(), + r = $(".joe_comment__respond-form .head input[name='url']").val(); + let d = $(".joe_comment__respond-form .body textarea[name='text']").val(); + if ("" === i.trim()) return Qmsg.info("请输入昵称!"); + if (!/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(c)) return Qmsg.info("请输入正确的邮箱!"); + if ("text" === a && "" === d.trim()) return Qmsg.info("请输入评论内容!"); + if ("draw" === a) { + const e = $("#joe_comment_draw")[0].toDataURL("image/webp", 0.1); + d = "{!{" + e + "}!} "; + } + e || + ((e = !0), + $(".joe_comment__respond-form .foot .submit button").html("发送中..."), + $.ajax({ + url: o, + type: "POST", + data: { author: i, mail: c, text: d, parent: n, url: r, _: s }, + dataType: "text", + success(t) { + let o = [], + a = ""; + (o = $(t).contents()), + Array.from(o).forEach((e) => { + "container" === e.parentNode.className && (a = e); + }), + /Joe/.test(t) ? window.location.reload() : (Qmsg.warning(a.textContent.trim() || ""), (e = !1), $(".joe_comment__respond-form .foot .submit button").html("发表评论")); + }, + error() { + (e = !1), $(".joe_comment__respond-form .foot .submit button").html("发表评论"), Qmsg.warning("发送失败!请刷新重试!"); + }, + })); + }); + } + if ( + ($(".comment-list__item .term .content .user .author a").each((e, t) => $(t).attr("target", "_blank")), + $(".joe_comment .joe_pagination a").each((e, t) => { + const o = $(t).attr("href"); + o && o.includes("#") && $(t).attr("href", o.replace("#comments", "?scroll=joe_comment")); + }), + Joe.DOCUMENT_TITLE) + ) { + const e = document.title; + document.addEventListener("visibilitychange", () => { + "hidden" === document.visibilityState ? (document.title = Joe.DOCUMENT_TITLE) : (document.title = e); + }); + } + $(".joe_header__above-slideicon").on("click", function () { + $(".joe_header__searchout").removeClass("active"), + $(".joe_header__slideout").hasClass("active") + ? ($("body").css("overflow", ""), $(".joe_header__mask").removeClass("active slideout"), $(".joe_header__slideout").removeClass("active")) + : ($("body").css("overflow", "hidden"), $(".joe_header__mask").addClass("active slideout"), $(".joe_header__slideout").addClass("active")); + }), + $(".joe_header__above-searchicon").on("click", function () { + $(".joe_header__slideout").removeClass("active"), + $(".joe_header__searchout").hasClass("active") + ? ($("body").css("overflow", ""), $(".joe_header__mask").removeClass("active slideout"), $(".joe_header__searchout").removeClass("active")) + : ($("body").css("overflow", "hidden"), $(".joe_header__mask").addClass("active"), $(".joe_header__searchout").addClass("active")); + }), + $(".joe_header__mask").on("click", function () { + $("body").css("overflow", ""), $(".joe_header__mask").removeClass("active slideout"), $(".joe_header__searchout").removeClass("active"), $(".joe_header__slideout").removeClass("active"); + }), + $(".joe_header__slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"), + $(".joe_header__slideout-menu .panel").on("click", function () { + const e = $(this).parent().parent(); + e.find(".panel").not($(this)).removeClass("in"), e.find(".panel-body").not($(this).siblings(".panel-body")).stop().hide("fast"), $(this).toggleClass("in").siblings(".panel-body").stop().toggle("fast"); + }); + { + const e = () => { + const e = new Date(Joe.BIRTHDAY), + t = +new Date(), + o = t - e.getTime(); + let a = o / 864e5, + n = Math.floor(a), + i = 24 * (a - n), + s = Math.floor(i), + c = 60 * (i - s), + r = Math.floor(c), + d = 60 * (c - r), + _ = Math.floor(d); + (a = String(n).padStart(2, 0)), + (i = String(s).padStart(2, 0)), + (c = String(r).padStart(2, 0)), + (d = String(_).padStart(2, 0)), + $(".joe_run__day").html(a), + $(".joe_run__hour").html(i), + $(".joe_run__minute").html(c), + $(".joe_run__second").html(d); + }; + Joe.BIRTHDAY && /(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2})\:(\d{1,2})\:(\d{1,2})/.test(Joe.BIRTHDAY) && (e(), setInterval(e, 1e3)); + } + $(".joe_owo__contain").length && + $(".joe_owo__target").length && + $.ajax({ + url: window.Joe.THEME_URL + "assets/json/joe.owo.json", + dataType: "json", + success(e) { + let t = "", + o = ""; + for (let a in e) { + const n = e[a]; + (t += `
${a}
`), + (o += `\n
    \n\t\t\t\t\t\t\t\t${n + .map((e) => `
  • ${"颜文字" === a ? `${e.icon}` : `${e.data}`}
  • `) + .join("")}\n
\n `); + } + $(".joe_owo__contain").html( + `\n
OωO
\n
\n ${o}\n
${t}
\n
\n ` + ), + $(document).on("click", function () { + $(".joe_owo__contain .box").stop().slideUp("fast"); + }), + $(".joe_owo__contain .seat").on("click", function (e) { + e.stopPropagation(), $(this).siblings(".box").stop().slideToggle("fast"); + }), + $(".joe_owo__contain .box .bar .item").on("click", function (e) { + e.stopPropagation(), $(this).addClass("active").siblings().removeClass("active"); + const t = '.joe_owo__contain .box .scroll[data-type="' + $(this).attr("data-type") + '"]'; + $(t).show().siblings(".scroll").hide(); + }), + $(".joe_owo__contain .scroll .item").on("click", function () { + const e = $(this).attr("data-text"); + $(".joe_owo__target").insertContent(e); + }), + $(".joe_owo__contain .box .bar .item").first().click(); + }, + }); + { + let e = Joe.MOTTO; + e || (e = "有钱终成眷属,没钱亲眼目睹"), e.includes("http") ? $.ajax({ url: e, dataType: "text", success: (e) => $(".joe_motto").html(e) }) : $(".joe_motto").html(e); + } + if (!window.Joe.IS_MOBILE) { + let e = !0; + const t = (t) => { + if (window.pageYOffset >= $(".joe_header").height() && t <= 0) { + if (e) return; + $(".joe_header").addClass("active"), $(".joe_aside .joe_aside__item:last-child").css("top", $(".joe_header").height() - 60 + 15), (e = !0); + } else { + if (!e) return; + $(".joe_header").removeClass("active"), $(".joe_aside .joe_aside__item:last-child").css("top", $(".joe_header").height() + 15), (e = !1); + } + }; + let o = window.pageYOffset; + t(o); + let a = Date.now(); + document.addEventListener("scroll", () => { + let e = Date.now(); + e - a > 15 && (t(o - window.pageYOffset), (o = window.pageYOffset)), (a = e); + }); + } +}); diff --git a/census.php b/census.php index b6d95d1..bb6cff6 100644 --- a/census.php +++ b/census.php @@ -15,7 +15,7 @@ need('public/include.php'); ?> - + diff --git a/core/factory.php b/core/factory.php index d735e74..427039c 100644 --- a/core/factory.php +++ b/core/factory.php @@ -169,8 +169,8 @@ class Editor public static function Edit() { ?> - - + + - - + + diff --git a/core/function.php b/core/function.php index 4abe77a..ae31e57 100644 --- a/core/function.php +++ b/core/function.php @@ -2,7 +2,7 @@ /* 获取主题当前版本号 */ function _getVersion() { - return "7.3.6"; + return "7.3.7"; }; /* 判断是否是手机 */ @@ -229,7 +229,7 @@ function _getThumbnails($item) } } else { for ($i = 0; $i < 3; $i++) { - $result[] = 'https://cdn.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/thumb/' . rand(1, 42) . '.jpg'; + $result[] = 'https://fastly.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/thumb/' . rand(1, 42) . '.jpg'; } } } diff --git a/friends.php b/friends.php index ceafee2..221e4db 100644 --- a/friends.php +++ b/friends.php @@ -17,10 +17,10 @@ options->JPrismTheme) : ?> - + - - + + diff --git a/functions.php b/functions.php index 2924e4f..cb29891 100644 --- a/functions.php +++ b/functions.php @@ -223,33 +223,33 @@ function themeConfig($form) 'JLive2d', array( 'off' => '关闭(默认)', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json' => 'shizuku', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-izumi@1.0.5/assets/izumi.model.json' => 'izumi', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-haru@1.0.5/01/assets/haru01.model.json' => 'haru01', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-haru@1.0.5/02/assets/haru02.model.json' => 'haru02', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json' => 'wanko', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-hijiki@1.0.5/assets/hijiki.model.json' => 'hijiki', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json' => 'koharu', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-z16@1.0.5/assets/z16.model.json' => 'z16', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-haruto@1.0.5/assets/haruto.model.json' => 'haruto', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-tororo@1.0.5/assets/tororo.model.json' => 'tororo', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-chitose@1.0.5/assets/chitose.model.json' => 'chitose', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-miku@1.0.5/assets/miku.model.json' => 'miku', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-epsilon2_1@1.0.5/assets/Epsilon2.1.model.json' => 'Epsilon2.1', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-unitychan@1.0.5/assets/unitychan.model.json' => 'unitychan', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-nico@1.0.5/assets/nico.model.json' => 'nico', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-rem@1.0.1/assets/rem.model.json' => 'rem', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-nito@1.0.5/assets/nito.model.json' => 'nito', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-nipsilon@1.0.5/assets/nipsilon.model.json' => 'nipsilon', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-ni-j@1.0.5/assets/ni-j.model.json' => 'ni-j', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-nietzsche@1.0.5/assets/nietzche.model.json' => 'nietzche', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-platelet@1.1.0/assets/platelet.model.json' => 'platelet', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-isuzu@1.0.4/assets/model.json' => 'isuzu', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-jth@1.0.0/assets/model/katou_01/katou_01.model.json' => 'katou_01', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-mikoto@1.0.0/assets/mikoto.model.json' => 'mikoto', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-mashiro-seifuku@1.0.1/assets/seifuku.model.json' => 'seifuku', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-ichigo@1.0.1/assets/ichigo.model.json' => 'ichigo', - 'https://cdn.jsdelivr.net/npm/live2d-widget-model-hk_fos@1.0.0/assets/hk416.model.json' => 'hk416' + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json' => 'shizuku', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-izumi@1.0.5/assets/izumi.model.json' => 'izumi', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-haru@1.0.5/01/assets/haru01.model.json' => 'haru01', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-haru@1.0.5/02/assets/haru02.model.json' => 'haru02', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json' => 'wanko', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-hijiki@1.0.5/assets/hijiki.model.json' => 'hijiki', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json' => 'koharu', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-z16@1.0.5/assets/z16.model.json' => 'z16', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-haruto@1.0.5/assets/haruto.model.json' => 'haruto', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-tororo@1.0.5/assets/tororo.model.json' => 'tororo', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-chitose@1.0.5/assets/chitose.model.json' => 'chitose', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-miku@1.0.5/assets/miku.model.json' => 'miku', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-epsilon2_1@1.0.5/assets/Epsilon2.1.model.json' => 'Epsilon2.1', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-unitychan@1.0.5/assets/unitychan.model.json' => 'unitychan', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-nico@1.0.5/assets/nico.model.json' => 'nico', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-rem@1.0.1/assets/rem.model.json' => 'rem', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-nito@1.0.5/assets/nito.model.json' => 'nito', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-nipsilon@1.0.5/assets/nipsilon.model.json' => 'nipsilon', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-ni-j@1.0.5/assets/ni-j.model.json' => 'ni-j', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-nietzsche@1.0.5/assets/nietzche.model.json' => 'nietzche', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-platelet@1.1.0/assets/platelet.model.json' => 'platelet', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-isuzu@1.0.4/assets/model.json' => 'isuzu', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-jth@1.0.0/assets/model/katou_01/katou_01.model.json' => 'katou_01', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-mikoto@1.0.0/assets/mikoto.model.json' => 'mikoto', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-mashiro-seifuku@1.0.1/assets/seifuku.model.json' => 'seifuku', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-ichigo@1.0.1/assets/ichigo.model.json' => 'ichigo', + 'https://fastly.jsdelivr.net/npm/live2d-widget-model-hk_fos@1.0.0/assets/hk416.model.json' => 'hk416' ), 'off', '选择一款喜爱的Live2D动态人物模型(仅在屏幕分辨率大于1760px下显示)', @@ -398,7 +398,7 @@ function themeConfig($form) $JAside_Author_Image = new Typecho_Widget_Helper_Form_Element_Textarea( 'JAside_Author_Image', NULL, - "https://cdn.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/img/aside_author_image.jpg", + "https://fastly.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/img/aside_author_image.jpg", '博主栏背景壁纸 - PC', '介绍:用于修改PC端博主栏的背景壁纸
格式:图片地址 或 Base64地址' @@ -409,7 +409,7 @@ function themeConfig($form) $JAside_Wap_Image = new Typecho_Widget_Helper_Form_Element_Textarea( 'JAside_Wap_Image', NULL, - "https://cdn.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/img/wap_aside_image.jpg", + "https://fastly.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/img/wap_aside_image.jpg", '博主栏背景壁纸 - WAP', '介绍:用于修改WAP端博主栏的背景壁纸
格式:图片地址 或 Base64地址' @@ -617,7 +617,7 @@ function themeConfig($form) $JLazyload = new Typecho_Widget_Helper_Form_Element_Textarea( 'JLazyload', NULL, - "https://cdn.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/img/lazyload.jpg", + "https://fastly.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/img/lazyload.jpg", '自定义懒加载图', '介绍:用于修改主题默认懒加载图
格式:图片地址' @@ -756,7 +756,7 @@ function themeConfig($form) $JFriends = new Typecho_Widget_Helper_Form_Element_Textarea( 'JFriends', NULL, - 'Joe的博客 || https://78.al || https://cdn.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/img/link.png || Eternity is not a distance but a decision', + 'Joe的博客 || https://78.al || https://fastly.jsdelivr.net/npm/typecho-joe-next@6.0.0/assets/img/link.png || Eternity is not a distance but a decision', '友情链接(非必填)', '介绍:用于填写友情链接
注意:您需要先增加友链链接页面(新增独立页面-右侧模板选择友链),该项才会生效
@@ -1002,46 +1002,46 @@ function themeConfig($form) $JPrismTheme = new Typecho_Widget_Helper_Form_Element_Select( 'JPrismTheme', array( - '//cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism.min.css' => 'prism(默认)', - '//cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-dark.min.css' => 'prism-dark', - '//cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.min.css' => 'prism-okaidia', - '//cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-solarizedlight.min.css' => 'prism-solarizedlight', - '//cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-tomorrow.min.css' => 'prism-tomorrow', - '//cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-twilight.min.css' => 'prism-twilight', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-a11y-dark.min.css' => 'prism-a11y-dark', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-atom-dark.min.css' => 'prism-atom-dark', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-base16-ateliersulphurpool.light.min.css' => 'prism-base16-ateliersulphurpool.light', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-cb.min.css' => 'prism-cb', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-coldark-cold.min.css' => 'prism-coldark-cold', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-coldark-dark.min.css' => 'prism-coldark-dark', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-darcula.min.css' => 'prism-darcula', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-dracula.min.css' => 'prism-dracula', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-dark.min.css' => 'prism-duotone-dark', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-earth.min.css' => 'prism-duotone-earth', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-forest.min.css' => 'prism-duotone-forest', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-light.min.css' => 'prism-duotone-light', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-sea.min.css' => 'prism-duotone-sea', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-space.min.css' => 'prism-duotone-space', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-ghcolors.min.css' => 'prism-ghcolors', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-gruvbox-dark.min.css' => 'prism-gruvbox-dark', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-hopscotch.min.css' => 'prism-hopscotch', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-lucario.min.css' => 'prism-lucario', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-material-dark.min.css' => 'prism-material-dark', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-material-light.min.css' => 'prism-material-light', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-material-oceanic.min.css' => 'prism-material-oceanic', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-night-owl.min.css' => 'prism-night-owl', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-nord.min.css' => 'prism-nord', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-pojoaque.min.css' => 'prism-pojoaque', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-shades-of-purple.min.css' => 'prism-shades-of-purple', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-synthwave84.min.css' => 'prism-synthwave84', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-vs.min.css' => 'prism-vs', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-vsc-dark-plus.min.css' => 'prism-vsc-dark-plus', - '//cdn.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-xonokai.min.css' => 'prism-xonokai', - '//cdn.jsdelivr.net/npm/prism-theme-one-light-dark@1.0.4/prism-onelight.min.css' => 'prism-onelight', - '//cdn.jsdelivr.net/npm/prism-theme-one-light-dark@1.0.4/prism-onedark.min.css' => 'prism-onedark', - '//cdn.jsdelivr.net/npm/prism-theme-one-dark@1.0.0/prism-onedark.min.css' => 'prism-onedark2', + '//fastly.jsdelivr.net/npm/prismjs@1.23.0/themes/prism.min.css' => 'prism(默认)', + '//fastly.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-dark.min.css' => 'prism-dark', + '//fastly.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.min.css' => 'prism-okaidia', + '//fastly.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-solarizedlight.min.css' => 'prism-solarizedlight', + '//fastly.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-tomorrow.min.css' => 'prism-tomorrow', + '//fastly.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-twilight.min.css' => 'prism-twilight', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-a11y-dark.min.css' => 'prism-a11y-dark', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-atom-dark.min.css' => 'prism-atom-dark', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-base16-ateliersulphurpool.light.min.css' => 'prism-base16-ateliersulphurpool.light', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-cb.min.css' => 'prism-cb', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-coldark-cold.min.css' => 'prism-coldark-cold', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-coldark-dark.min.css' => 'prism-coldark-dark', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-darcula.min.css' => 'prism-darcula', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-dracula.min.css' => 'prism-dracula', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-dark.min.css' => 'prism-duotone-dark', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-earth.min.css' => 'prism-duotone-earth', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-forest.min.css' => 'prism-duotone-forest', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-light.min.css' => 'prism-duotone-light', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-sea.min.css' => 'prism-duotone-sea', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-duotone-space.min.css' => 'prism-duotone-space', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-ghcolors.min.css' => 'prism-ghcolors', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-gruvbox-dark.min.css' => 'prism-gruvbox-dark', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-hopscotch.min.css' => 'prism-hopscotch', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-lucario.min.css' => 'prism-lucario', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-material-dark.min.css' => 'prism-material-dark', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-material-light.min.css' => 'prism-material-light', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-material-oceanic.min.css' => 'prism-material-oceanic', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-night-owl.min.css' => 'prism-night-owl', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-nord.min.css' => 'prism-nord', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-pojoaque.min.css' => 'prism-pojoaque', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-shades-of-purple.min.css' => 'prism-shades-of-purple', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-synthwave84.min.css' => 'prism-synthwave84', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-vs.min.css' => 'prism-vs', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-vsc-dark-plus.min.css' => 'prism-vsc-dark-plus', + '//fastly.jsdelivr.net/npm/prism-themes@1.7.0/themes/prism-xonokai.min.css' => 'prism-xonokai', + '//fastly.jsdelivr.net/npm/prism-theme-one-light-dark@1.0.4/prism-onelight.min.css' => 'prism-onelight', + '//fastly.jsdelivr.net/npm/prism-theme-one-light-dark@1.0.4/prism-onedark.min.css' => 'prism-onedark', + '//fastly.jsdelivr.net/npm/prism-theme-one-dark@1.0.0/prism-onedark.min.css' => 'prism-onedark2', ), - '//cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism.min.css', + '//fastly.jsdelivr.net/npm/prismjs@1.23.0/themes/prism.min.css', '选择一款您喜欢的代码高亮样式', '介绍:用于修改代码块的高亮风格
其他:如果您有其他样式,可通过源代码修改此项,引入您的自定义样式链接' diff --git a/index.php b/index.php index 217482e..4afd2d2 100644 --- a/index.php +++ b/index.php @@ -13,9 +13,9 @@ need('public/include.php'); ?> - - - + + + @@ -182,4 +182,4 @@ - + \ No newline at end of file diff --git a/leaving.php b/leaving.php index d02f175..03b3480 100644 --- a/leaving.php +++ b/leaving.php @@ -14,7 +14,7 @@ need('public/include.php'); ?> - + diff --git a/library/files.php b/library/files.php index 33d8071..429c354 100644 --- a/library/files.php +++ b/library/files.php @@ -190,7 +190,7 @@ class config if (isset($_GET['config'])) self::dump_config($local_config, $storage_path, self::$storage_config, $user_config, $user_valid); // CDN assets - self::$assets = self::$prod ? 'https://cdn.jsdelivr.net/npm/files.photo.gallery@' . self::$version . '/' : ''; + self::$assets = self::$prod ? 'https://fastly.jsdelivr.net/npm/files.photo.gallery@' . self::$version . '/' : ''; // root self::$root = real_path(self::$config['root']); @@ -1247,7 +1247,7 @@ if (post('action')) { } else if ($action === 'do_update') { header('Content-Type: application/json'); $version = post('version'); - $file = 'https://cdn.jsdelivr.net/npm/files.photo.gallery' . ($version ? '@' . $version : '') . '/index.php'; + $file = 'https://fastly.jsdelivr.net/npm/files.photo.gallery' . ($version ? '@' . $version : '') . '/index.php'; $update_is_newer = !$version || version_compare($version, config::$version) > 0; $writeable = $update_is_newer && is_writable(__DIR__) && is_writable(__FILE__); $get = $writeable ? @file_get_contents($file) : false; @@ -1420,7 +1420,7 @@ if (post('action')) { <?php echo $init_path ? basename($init_path) : '/'; ?> - + @@ -1472,21 +1472,21 @@ if (post('action')) { - - - - - - - - - - + + + + + + + + + + - + diff --git a/library/player.php b/library/player.php index f2facd4..c337f00 100644 --- a/library/player.php +++ b/library/player.php @@ -26,8 +26,8 @@
- - + + - + + diff --git a/post.php b/post.php index f2bd646..9e7aad2 100644 --- a/post.php +++ b/post.php @@ -6,10 +6,10 @@ options->JPrismTheme) : ?> - + - - + + diff --git a/public/include.php b/public/include.php index 8dc72c5..c1c7a91 100644 --- a/public/include.php +++ b/public/include.php @@ -20,26 +20,26 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + options->JAside_3DTag === 'on') : ?> - + - + options->JCursorEffects && $this->options->JCursorEffects !== 'off') : ?> -options->JCustomHeadEnd() ?> +options->JCustomHeadEnd() ?> \ No newline at end of file