-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
1 lines (1 loc) · 6.78 KB
/
script.js
1
function _0x126c(_0x517606,_0x7f82ae){const _0x543387=_0x5433();return _0x126c=function(_0x126c0d,_0x1523b3){_0x126c0d=_0x126c0d-0xa7;let _0x46de6b=_0x543387[_0x126c0d];return _0x46de6b;},_0x126c(_0x517606,_0x7f82ae);}function _0x5433(){const _0x51488a=['toDataURL','reset','tweet-quote','author','quote.png','application/json','_blank','append','fc1bf28b-4b8a-4a1e-abba-4e495ef0be0e','102282IALNQA','&source=','Client-ID\x20','https://api.quotable.io/random','createElement','&url=','click','style','Instagram\x20does\x20not\x20support\x20direct\x20text\x20sharing.\x20Please\x20copy\x20the\x20quote\x20manually:\x20','json','48yuVtAh','none','Please\x20wait...','link','https://www.linkedin.com/shareArticle?mini=true&url=','result','279fClzdZ','&summary=','40px','marginLeft','quote','split','10kaZQmO','https://api.imgur.com/3/upload','3945864ONSRJT','.quote-card','Error\x20fetching\x20quote:','content','twitter','textContent','then','visible','.quote-overlay','preventDefault','fromEntries','https://picsum.photos/600/300?random=','visibility','textAlign','form','3863160ncRQcP','42170qQImXx','stringify','204BvRxHA','open','DOMContentLoaded','innerHTML','13640310rIBwMN','center','linkedin','image','image/png','3650066lpjmgf','instagram','error','href','addEventListener','Something\x20went\x20wrong!','POST','log','&title=','data','access_key','url(','querySelector','hidden','Error\x20sharing\x20the\x20quote.\x20Please\x20try\x20again.','submit','getElementById'];_0x5433=function(){return _0x51488a;};return _0x5433();}const _0xd0ecbc=_0x126c;(function(_0x40e55c,_0x39172b){const _0x597be5=_0x126c,_0x3d2ec7=_0x40e55c();while(!![]){try{const _0x4faf0c=-parseInt(_0x597be5(0xd0))/0x1*(parseInt(_0x597be5(0xba))/0x2)+parseInt(_0x597be5(0xca))/0x3*(parseInt(_0x597be5(0xe4))/0x4)+-parseInt(_0x597be5(0xe2))/0x5*(-parseInt(_0x597be5(0xc4))/0x6)+-parseInt(_0x597be5(0xed))/0x7+-parseInt(_0x597be5(0xd2))/0x8+parseInt(_0x597be5(0xe1))/0x9+parseInt(_0x597be5(0xe8))/0xa;if(_0x4faf0c===_0x39172b)break;else _0x3d2ec7['push'](_0x3d2ec7['shift']());}catch(_0x5d0321){_0x3d2ec7['push'](_0x3d2ec7['shift']());}}}(_0x5433,0x52dcd),document[_0xd0ecbc(0xf1)](_0xd0ecbc(0xe6),()=>{const _0x5a0fbb=_0xd0ecbc,_0x92aefd=document['getElementById'](_0x5a0fbb(0xce)),_0x1253e5=document[_0x5a0fbb(0xb0)](_0x5a0fbb(0xb4)),_0x3956cd=document['getElementById']('new-quote-btn'),_0x2291e3=document[_0x5a0fbb(0xb0)]('download-quote-btn'),_0x4f6a73=document[_0x5a0fbb(0xb0)](_0x5a0fbb(0xb3)),_0x54b7c3=document[_0x5a0fbb(0xb0)]('linkedin-quote'),_0x73993d=document['getElementById']('instagram-quote'),_0x2d445d=document['querySelector'](_0x5a0fbb(0xd3)),_0x1faa3d=document[_0x5a0fbb(0xac)](_0x5a0fbb(0xda)),_0x55c40d=document['getElementById'](_0x5a0fbb(0xe0)),_0x584ee0=document[_0x5a0fbb(0xb0)](_0x5a0fbb(0xc9)),_0x346f17=_0x5a0fbb(0xb9),_0xd06cd4='17bba887dcdc83f';async function _0x23380b(){const _0xce8879=_0x5a0fbb;try{const _0x1d1443=await fetch(_0xce8879(0xbd)),_0x37ffba=await _0x1d1443[_0xce8879(0xc3)]();_0x92aefd[_0xce8879(0xd7)]='\x22'+_0x37ffba[_0xce8879(0xd5)]+'\x22',_0x1253e5[_0xce8879(0xd7)]='-\x20'+_0x37ffba[_0xce8879(0xb4)];const _0x32917f=_0xce8879(0xdd)+Math['floor'](Math['random']()*0x3e8);_0x2d445d[_0xce8879(0xc1)]['backgroundImage']=_0xce8879(0xab)+_0x32917f+')';}catch(_0x133244){console['error'](_0xce8879(0xd4),_0x133244);}}_0x3956cd['addEventListener'](_0x5a0fbb(0xc0),_0x23380b),_0x2291e3[_0x5a0fbb(0xf1)](_0x5a0fbb(0xc0),()=>{const _0x1751dc=_0x5a0fbb;_0x2d5ce9()[_0x1751dc(0xd8)](_0x57d0c7=>{const _0x1e2c4d=_0x1751dc,_0xd84c23=document[_0x1e2c4d(0xbe)]('a');_0xd84c23['download']=_0x1e2c4d(0xb5),_0xd84c23[_0x1e2c4d(0xf0)]=_0x57d0c7[_0x1e2c4d(0xb1)]('image/png'),_0xd84c23[_0x1e2c4d(0xc0)]();});});async function _0x2d5ce9(){const _0x5ddcb8=_0x5a0fbb,_0x4875cd=_0x2d445d[_0x5ddcb8(0xac)]('.quote-actions');_0x4875cd['style'][_0x5ddcb8(0xde)]=_0x5ddcb8(0xad),_0x1faa3d[_0x5ddcb8(0xc1)][_0x5ddcb8(0xdf)]=_0x5ddcb8(0xe9),_0x1faa3d[_0x5ddcb8(0xc1)][_0x5ddcb8(0xcd)]=_0x5ddcb8(0xcc);const _0x1c72a8=await html2canvas(_0x2d445d,{'useCORS':!![]});return _0x4875cd[_0x5ddcb8(0xc1)][_0x5ddcb8(0xde)]=_0x5ddcb8(0xd9),_0x1faa3d['style'][_0x5ddcb8(0xdf)]='',_0x1faa3d['style'][_0x5ddcb8(0xcd)]='',_0x1c72a8;}async function _0x402208(_0xc37685){const _0x4c8d7d=_0x5a0fbb,_0x2e75ea=_0xc37685[_0x4c8d7d(0xb1)](_0x4c8d7d(0xec)),_0x70eb32=new FormData();_0x70eb32[_0x4c8d7d(0xb8)](_0x4c8d7d(0xeb),_0x2e75ea[_0x4c8d7d(0xcf)](',')[0x1]);try{const _0x3763e5=await fetch(_0x4c8d7d(0xd1),{'method':_0x4c8d7d(0xf3),'headers':{'Authorization':_0x4c8d7d(0xbc)+_0xd06cd4},'body':_0x70eb32}),_0x435f8d=await _0x3763e5[_0x4c8d7d(0xc3)]();return _0x435f8d[_0x4c8d7d(0xa9)][_0x4c8d7d(0xc7)];}catch(_0x4f5bd0){return console[_0x4c8d7d(0xef)]('Error\x20uploading\x20image:',_0x4f5bd0),null;}}async function _0x267ce5(_0x12752b){const _0x4c19d5=_0x5a0fbb,_0x4f5b96=await _0x2d5ce9(),_0x44da2e=await _0x402208(_0x4f5b96);if(!_0x44da2e){alert(_0x4c19d5(0xae));return;}const _0x5dc614=_0x92aefd[_0x4c19d5(0xd7)],_0x4ec190=_0x1253e5['textContent'];let _0x50aa6f;if(_0x12752b===_0x4c19d5(0xd6))_0x50aa6f='https://twitter.com/intent/tweet?text='+encodeURIComponent(_0x5dc614+'\x20'+_0x4ec190)+_0x4c19d5(0xbf)+encodeURIComponent(_0x44da2e);else{if(_0x12752b===_0x4c19d5(0xea))_0x50aa6f=_0x4c19d5(0xc8)+encodeURIComponent(_0x44da2e)+_0x4c19d5(0xa8)+encodeURIComponent(_0x5dc614)+_0x4c19d5(0xcb)+encodeURIComponent(_0x4ec190)+_0x4c19d5(0xbb)+encodeURIComponent(location[_0x4c19d5(0xf0)]);else{if(_0x12752b==='instagram'){alert(_0x4c19d5(0xc2)+_0x5dc614+'\x20'+_0x4ec190);return;}}}window[_0x4c19d5(0xe5)](_0x50aa6f,_0x4c19d5(0xb7));}_0x4f6a73[_0x5a0fbb(0xf1)](_0x5a0fbb(0xc0),()=>_0x267ce5(_0x5a0fbb(0xd6))),_0x54b7c3[_0x5a0fbb(0xf1)](_0x5a0fbb(0xc0),()=>_0x267ce5('linkedin')),_0x73993d['addEventListener'](_0x5a0fbb(0xc0),()=>_0x267ce5(_0x5a0fbb(0xee))),_0x55c40d[_0x5a0fbb(0xf1)](_0x5a0fbb(0xaf),function(_0x14804b){const _0x46b312=_0x5a0fbb;_0x14804b[_0x46b312(0xdb)]();const _0x5bb950=new FormData(_0x55c40d),_0x3cbfae=Object[_0x46b312(0xdc)](_0x5bb950);_0x3cbfae[_0x46b312(0xaa)]=_0x346f17;const _0x13ce9f=JSON[_0x46b312(0xe3)](_0x3cbfae);_0x584ee0['innerHTML']=_0x46b312(0xc6),fetch('https://api.web3forms.com/submit',{'method':_0x46b312(0xf3),'headers':{'Content-Type':'application/json','Accept':_0x46b312(0xb6)},'body':_0x13ce9f})[_0x46b312(0xd8)](async _0x2e6acd=>{const _0x4075d1=_0x46b312;let _0x5718af=await _0x2e6acd[_0x4075d1(0xc3)]();_0x2e6acd['status']==0xc8?_0x584ee0[_0x4075d1(0xe7)]='Form\x20submitted\x20successfully':(console[_0x4075d1(0xa7)](_0x2e6acd),_0x584ee0[_0x4075d1(0xe7)]=_0x5718af['message']);})['catch'](_0x57ab6a=>{const _0x11421a=_0x46b312;console[_0x11421a(0xa7)](_0x57ab6a),_0x584ee0[_0x11421a(0xe7)]=_0x11421a(0xf2);})[_0x46b312(0xd8)](function(){const _0x223903=_0x46b312;_0x55c40d[_0x223903(0xb2)](),setTimeout(()=>{const _0x264f43=_0x223903;_0x584ee0['style']['display']=_0x264f43(0xc5);},0xbb8);});}),_0x23380b();}));