These changes attempt fix #194, aka. clicking on 'Download' in the cape-stealer utility doesn't actually download the cape.
Changes made:
Fix clicking on 'Download' not actually downloading the cape.
Code Changes
Removed unnecessary variables and infer some variable types
Made downloading capes actually function by calling the downloadSkin function on click and passing in the image url. Then, in the downloadSkin function, it fetches the image, gets the blob and then creates a new 'a' element, makes the href of that element to be the blob url, and lastly clicks it and removes the element. The reason this approach is needed is because in spring 2018, chrome (and I'm quite sure other browsers now too) started ignoring download attributes that pointed to cross origin urls, making the other most obvious solution not work with the capes.dev api.
Feel free let me know if you want anything changed!
These changes attempt fix #194, aka. clicking on 'Download' in the cape-stealer utility doesn't actually download the cape.
Changes made:
Code Changes
Feel free let me know if you want anything changed!