-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonteamjaime.min.js
1 lines (1 loc) · 1.37 KB
/
onteamjaime.min.js
1
function findFile(e){e.files&&e.files[0]&&(document.getElementById('file-label').innerHTML=e.files[0].name,document.getElementById('submit').style.display='inline')}function flexNone(e){var t=document.getElementById(e);t.style.display==="none"?(t.style.display="flex"):(t.style.display="none")}function hide(e){document.getElementById(e).style.display="none"}function show(e){document.getElementById(e).style.display="block"}function putForward(e){document.getElementById(e).style.opacity="1";document.getElementById(e).style.zIndex="2"}function putBack(e){document.getElementById(e).style.opacity="0";document.getElementById(e).style.zIndex="-1"}function expand(e){document.getElementById(e).style.height="auto"}function makeImage(){let e=document.getElementById('canvas'),t=e.getContext('2d');var n=new Image,l=new Image;n.src='images/JaimeCapeFinal.png';n.onload=function(){t.drawImage(n,0,0,1200,675);upload=document.getElementById('inputfile').files.item(0);l.src=URL.createObjectURL(upload);l.onload=function(){t.globalCompositeOperation='destination-over';l.height<l.width&&t.drawImage(l,413,34,605.8*l.width/l.height,605.8);t.drawImage(l,413,34,750.4,750.4*l.height/l.width);e.toBlob(n=>{var l=URL.createObjectURL(n);document.getElementById('avatar-generated').src=l;document.getElementById('download-1').href=l;document.getElementById('download-2').href=l;t.clearRect(0,0,e.width,e.height)})}}}