Discuss Scratch
- Discussion Forums
- » Questions about Scratch
- » how do you use the scratch assets thing to show pictures in the forums?
- winterwolfy
-
Scratcher
1000+ posts
how do you use the scratch assets thing to show pictures in the forums?
^
Last edited by winterwolfy (April 13, 2022 14:25:39)
- IDontNoWatIAm
-
Scratcher
500+ posts
how do you use the scratch assets thing to show pictures in the forums?
I think you can use an extension to use assets, but I'm not sure how too without it, but there is a way using project and studio thumbnails
Copied from a previous post I made
You can upload your image to a project or studio, set it as the thumbnail, right click the thumbnail image, press open image in new tab, copy the link, and then use the img tag and paste the link. You can also increase or decrease the size of it by changing the numbers in the (number)x(number) part at the end of the link.
Additionally, changing the thumbnail of the project or studio will also change the image as seen on the forums, so you should make separate projects for each image. Also, to my knowledge, there is no way to change the dimensions of the image.
Copied from a previous post I made
You can upload your image to a project or studio, set it as the thumbnail, right click the thumbnail image, press open image in new tab, copy the link, and then use the img tag and paste the link. You can also increase or decrease the size of it by changing the numbers in the (number)x(number) part at the end of the link.
Additionally, changing the thumbnail of the project or studio will also change the image as seen on the forums, so you should make separate projects for each image. Also, to my knowledge, there is no way to change the dimensions of the image.
- winterwolfy
-
Scratcher
1000+ posts
how do you use the scratch assets thing to show pictures in the forums?
I think you can use an extension to use assets, but I'm not sure how too without it, but there is a way using project and studio thumbnailsok!
Copied from a previous post I made
You can upload your image to a project or studio, set it as the thumbnail, right click the thumbnail image, press open image in new tab, copy the link, and then use the img tag and paste the link. You can also increase or decrease the size of it by changing the numbers in the (number)x(number) part at the end of the link.
Additionally, changing the thumbnail of the project or studio will also change the image as seen on the forums, so you should make separate projects for each image. Also, to my knowledge, there is no way to change the dimensions of the image.
- TheGlassPenguin
-
Scratcher
1000+ posts
how do you use the scratch assets thing to show pictures in the forums?
- triple-click this code and drag it to your bookmarks bar:
javascript: if(!document.getElementById("_meta_md5")){var scr=document.createElement("script");scr.innerHTML=`!function(){"use strict";function t(t){if(t)d[0]=d[16]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,this.blocks=d,this.buffer8=l;else if(a){var r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}var r="input is invalid type",e="object"==typeof window,i=e?window:{};i.JS_MD5_NO_WINDOW&&(e=!1);var%20s=!e&&%22object%22==typeof%20self,h=!i.JS_MD5_NO_NODE_JS&&%22object%22==typeof%20process&&process.versions&&process.versions.node;h?i=global:s&&(i=self);var%20f=!i.JS_MD5_NO_COMMON_JS&&%22object%22==typeof%20module&&module.exports,o=%22function%22==typeof%20define&&define.amd,a=!i.JS_MD5_NO_ARRAY_BUFFER&&%22undefined%22!=typeof%20ArrayBuffer,n=%220123456789abcdef%22.split(%22%22),u=[128,32768,8388608,-2147483648],y=[0,8,16,24],c=[%22hex%22,%22array%22,%22digest%22,%22buffer%22,%22arrayBuffer%22,%22base64%22],p=%22ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/%22.split(%22%22),d=[],l;if(a){var%20A=new%20ArrayBuffer(68);l=new%20Uint8Array(A),d=new%20Uint32Array(A)}!i.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return%22[object%20Array]%22===Object.prototype.toString.call(t)}),!a||!i.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return%22object%22==typeof%20t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var%20b=function(r){return%20function(e){return%20new%20t(!0).update(e)[r]()}},v=function(){var%20r=b(%22hex%22);h&&(r=w(r)),r.create=function(){return%20new%20t},r.update=function(t){return%20r.create().update(t)};for(var%20e=0;e%3Cc.length;++e){var%20i=c[e];r[i]=b(i)}return%20r},w=function(t){var%20e=eval(%22require(%27crypto%27)%22),i=eval(%22require(%27buffer%27).Buffer%22),s=function(s){if(%22string%22==typeof%20s)return%20e.createHash(%22md5%22).update(s,%22utf8%22).digest(%22hex%22);if(null===s||void%200===s)throw%20r;return%20s.constructor===ArrayBuffer&&(s=new%20Uint8Array(s)),Array.isArray(s)||ArrayBuffer.isView(s)||s.constructor===i?e.createHash(%22md5%22).update(new%20i(s)).digest(%22hex%22):t(s)};return%20s};t.prototype.update=function(t){if(!this.finalized){var%20e,i=typeof%20t;if(%22string%22!==i){if(%22object%22!==i)throw%20r;if(null===t)throw%20r;if(a&&t.constructor===ArrayBuffer)t=new%20Uint8Array(t);else%20if(!(Array.isArray(t)||a&&ArrayBuffer.isView(t)))throw%20r;e=!0}for(var%20s,h,f=0,o=t.length,n=this.blocks,u=this.buffer8;f%3Co;){if(this.hashed&&(this.hashed=!1,n[0]=n[16],n[16]=n[1]=n[2]=n[3]=n[4]=n[5]=n[6]=n[7]=n[8]=n[9]=n[10]=n[11]=n[12]=n[13]=n[14]=n[15]=0),e)if(a)for(h=this.start;f%3Co&&h%3C64;++f)u[h++]=t[f];else%20for(h=this.start;f%3Co&&h%3C64;++f)n[h%3E%3E2]|=t[f]%3C%3Cy[3&h++];else%20if(a)for(h=this.start;f%3Co&&h%3C64;++f)(s=t.charCodeAt(f))%3C128?u[h++]=s:s%3C2048?(u[h++]=192|s%3E%3E6,u[h++]=128|63&s):s%3C55296||s%3E=57344?(u[h++]=224|s%3E%3E12,u[h++]=128|s%3E%3E6&63,u[h++]=128|63&s):(s=65536+((1023&s)%3C%3C10|1023&t.charCodeAt(++f)),u[h++]=240|s%3E%3E18,u[h++]=128|s%3E%3E12&63,u[h++]=128|s%3E%3E6&63,u[h++]=128|63&s);else%20for(h=this.start;f%3Co&&h%3C64;++f)(s=t.charCodeAt(f))%3C128?n[h%3E%3E2]|=s%3C%3Cy[3&h++]:s%3C2048?(n[h%3E%3E2]|=(192|s%3E%3E6)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|63&s)%3C%3Cy[3&h++]):s%3C55296||s%3E=57344?(n[h%3E%3E2]|=(224|s%3E%3E12)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|s%3E%3E6&63)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|63&s)%3C%3Cy[3&h++]):(s=65536+((1023&s)%3C%3C10|1023&t.charCodeAt(++f)),n[h%3E%3E2]|=(240|s%3E%3E18)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|s%3E%3E12&63)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|s%3E%3E6&63)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|63&s)%3C%3Cy[3&h++]);this.lastByteIndex=h,this.bytes+=h-this.start,h%3E=64?(this.start=h-64,this.hash(),this.hashed=!0):this.start=h}return%20this.bytes%3E4294967295&&(this.hBytes+=this.bytes/4294967296%3C%3C0,this.bytes=this.bytesB94967296),this}},t.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var%20t=this.blocks,r=this.lastByteIndex;t[r%3E%3E2]|=u[3&r],r%3E=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes%3C%3C3,t[15]=this.hBytes%3C%3C3|this.bytes%3E%3E%3E29,this.hash()}},t.prototype.hash=function(){var%20t,r,e,i,s,h,f=this.blocks;this.first?r=((r=((t=((t=f[0]-680876937)%3C%3C7|t%3E%3E%3E25)-271733879%3C%3C0)^(e=((e=(-271733879^(i=((i=(-1732584194^2004318071&t)+f[1]-117830708)%3C%3C12|i%3E%3E%3E20)+t%3C%3C0)&(-271733879^t))+f[2]-1126478375)%3C%3C17|e%3E%3E%3E15)+i%3C%3C0)&(i^t))+f[3]-1316259209)%3C%3C22|r%3E%3E%3E10)+e%3C%3C0:(t=this.h0,r=this.h1,e=this.h2,r=((r+=((t=((t+=((i=this.h3)^r&(e^i))+f[0]-680876936)%3C%3C7|t%3E%3E%3E25)+r%3C%3C0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+f[1]-389564586)%3C%3C12|i%3E%3E%3E20)+t%3C%3C0)&(t^r))+f[2]+606105819)%3C%3C17|e%3E%3E%3E15)+i%3C%3C0)&(i^t))+f[3]-1044525330)%3C%3C22|r%3E%3E%3E10)+e%3C%3C0),r=((r+=((t=((t+=(i^r&(e^i))+f[4]-176418897)%3C%3C7|t%3E%3E%3E25)+r%3C%3C0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+f[5]+1200080426)%3C%3C12|i%3E%3E%3E20)+t%3C%3C0)&(t^r))+f[6]-1473231341)%3C%3C17|e%3E%3E%3E15)+i%3C%3C0)&(i^t))+f[7]-45705983)%3C%3C22|r%3E%3E%3E10)+e%3C%3C0,r=((r+=((t=((t+=(i^r&(e^i))+f[8]+1770035416)%3C%3C7|t%3E%3E%3E25)+r%3C%3C0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+f[9]-1958414417)%3C%3C12|i%3E%3E%3E20)+t%3C%3C0)&(t^r))+f[10]-42063)%3C%3C17|e%3E%3E%3E15)+i%3C%3C0)&(i^t))+f[11]-1990404162)%3C%3C22|r%3E%3E%3E10)+e%3C%3C0,r=((r+=((t=((t+=(i^r&(e^i))+f[12]+1804603682)%3C%3C7|t%3E%3E%3E25)+r%3C%3C0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+f[13]-40341101)%3C%3C12|i%3E%3E%3E20)+t%3C%3C0)&(t^r))+f[14]-1502002290)%3C%3C17|e%3E%3E%3E15)+i%3C%3C0)&(i^t))+f[15]+1236535329)%3C%3C22|r%3E%3E%3E10)+e%3C%3C0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+f[1]-165796510)%3C%3C5|t%3E%3E%3E27)+r%3C%3C0)^r))+f[6]-1069501632)%3C%3C9|i%3E%3E%3E23)+t%3C%3C0)^t&((e=((e+=(t^r&(i^t))+f[11]+643717713)%3C%3C14|e%3E%3E%3E18)+i%3C%3C0)^i))+f[0]-373897302)%3C%3C20|r%3E%3E%3E12)+e%3C%3C0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+f[5]-701558691)%3C%3C5|t%3E%3E%3E27)+r%3C%3C0)^r))+f[10]+38016083)%3C%3C9|i%3E%3E%3E23)+t%3C%3C0)^t&((e=((e+=(t^r&(i^t))+f[15]-660478335)%3C%3C14|e%3E%3E%3E18)+i%3C%3C0)^i))+f[4]-405537848)%3C%3C20|r%3E%3E%3E12)+e%3C%3C0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+f[9]+568446438)%3C%3C5|t%3E%3E%3E27)+r%3C%3C0)^r))+f[14]-1019803690)%3C%3C9|i%3E%3E%3E23)+t%3C%3C0)^t&((e=((e+=(t^r&(i^t))+f[3]-187363961)%3C%3C14|e%3E%3E%3E18)+i%3C%3C0)^i))+f[8]+1163531501)%3C%3C20|r%3E%3E%3E12)+e%3C%3C0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+f[13]-1444681467)%3C%3C5|t%3E%3E%3E27)+r%3C%3C0)^r))+f[2]-51403784)%3C%3C9|i%3E%3E%3E23)+t%3C%3C0)^t&((e=((e+=(t^r&(i^t))+f[7]+1735328473)%3C%3C14|e%3E%3E%3E18)+i%3C%3C0)^i))+f[12]-1926607734)%3C%3C20|r%3E%3E%3E12)+e%3C%3C0,r=((r+=((h=(i=((i+=((s=r^e)^(t=((t+=(s^i)+f[5]-378558)%3C%3C4|t%3E%3E%3E28)+r%3C%3C0))+f[8]-2022574463)%3C%3C11|i%3E%3E%3E21)+t%3C%3C0)^t)^(e=((e+=(h^r)+f[11]+1839030562)%3C%3C16|e%3E%3E%3E16)+i%3C%3C0))+f[14]-35309556)%3C%3C23|r%3E%3E%3E9)+e%3C%3C0,r=((r+=((h=(i=((i+=((s=r^e)^(t=((t+=(s^i)+f[1]-1530992060)%3C%3C4|t%3E%3E%3E28)+r%3C%3C0))+f[4]+1272893353)%3C%3C11|i%3E%3E%3E21)+t%3C%3C0)^t)^(e=((e+=(h^r)+f[7]-155497632)%3C%3C16|e%3E%3E%3E16)+i%3C%3C0))+f[10]-1094730640)%3C%3C23|r%3E%3E%3E9)+e%3C%3C0,r=((r+=((h=(i=((i+=((s=r^e)^(t=((t+=(s^i)+f[13]+681279174)%3C%3C4|t%3E%3E%3E28)+r%3C%3C0))+f[0]-358537222)%3C%3C11|i%3E%3E%3E21)+t%3C%3C0)^t)^(e=((e+=(h^r)+f[3]-722521979)%3C%3C16|e%3E%3E%3E16)+i%3C%3C0))+f[6]+76029189)%3C%3C23|r%3E%3E%3E9)+e%3C%3C0,r=((r+=((h=(i=((i+=((s=r^e)^(t=((t+=(s^i)+f[9]-640364487)%3C%3C4|t%3E%3E%3E28)+r%3C%3C0))+f[12]-421815835)%3C%3C11|i%3E%3E%3E21)+t%3C%3C0)^t)^(e=((e+=(h^r)+f[15]+530742520)%3C%3C16|e%3E%3E%3E16)+i%3C%3C0))+f[2]-995338651)%3C%3C23|r%3E%3E%3E9)+e%3C%3C0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+f[0]-198630844)%3C%3C6|t%3E%3E%3E26)+r%3C%3C0)|~e))+f[7]+1126891415)%3C%3C10|i%3E%3E%3E22)+t%3C%3C0)^((e=((e+=(t^(i|~r))+f[14]-1416354905)%3C%3C15|e%3E%3E%3E17)+i%3C%3C0)|~t))+f[5]-57434055)%3C%3C21|r%3E%3E%3E11)+e%3C%3C0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+f[12]+1700485571)%3C%3C6|t%3E%3E%3E26)+r%3C%3C0)|~e))+f[3]-1894986606)%3C%3C10|i%3E%3E%3E22)+t%3C%3C0)^((e=((e+=(t^(i|~r))+f[10]-1051523)%3C%3C15|e%3E%3E%3E17)+i%3C%3C0)|~t))+f[1]-2054922799)%3C%3C21|r%3E%3E%3E11)+e%3C%3C0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+f[8]+1873313359)%3C%3C6|t%3E%3E%3E26)+r%3C%3C0)|~e))+f[15]-30611744)%3C%3C10|i%3E%3E%3E22)+t%3C%3C0)^((e=((e+=(t^(i|~r))+f[6]-1560198380)%3C%3C15|e%3E%3E%3E17)+i%3C%3C0)|~t))+f[13]+1309151649)%3C%3C21|r%3E%3E%3E11)+e%3C%3C0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+f[4]-145523070)%3C%3C6|t%3E%3E%3E26)+r%3C%3C0)|~e))+f[11]-1120210379)%3C%3C10|i%3E%3E%3E22)+t%3C%3C0)^((e=((e+=(t^(i|~r))+f[2]+718787259)%3C%3C15|e%3E%3E%3E17)+i%3C%3C0)|~t))+f[9]-343485551)%3C%3C21|r%3E%3E%3E11)+e%3C%3C0,this.first?(this.h0=t+1732584193%3C%3C0,this.h1=r-271733879%3C%3C0,this.h2=e-1732584194%3C%3C0,this.h3=i+271733878%3C%3C0,this.first=!1):(this.h0=this.h0+t%3C%3C0,this.h1=this.h1+r%3C%3C0,this.h2=this.h2+e%3C%3C0,this.h3=this.h3+i%3C%3C0)},t.prototype.hex=function(){this.finalize();var%20t=this.h0,r=this.h1,e=this.h2,i=this.h3;return%20n[t%3E%3E4&15]+n[15&t]+n[t%3E%3E12&15]+n[t%3E%3E8&15]+n[t%3E%3E20&15]+n[t%3E%3E16&15]+n[t%3E%3E28&15]+n[t%3E%3E24&15]+n[r%3E%3E4&15]+n[15&r]+n[r%3E%3E12&15]+n[r%3E%3E8&15]+n[r%3E%3E20&15]+n[r%3E%3E16&15]+n[r%3E%3E28&15]+n[r%3E%3E24&15]+n[e%3E%3E4&15]+n[15&e]+n[e%3E%3E12&15]+n[e%3E%3E8&15]+n[e%3E%3E20&15]+n[e%3E%3E16&15]+n[e%3E%3E28&15]+n[e%3E%3E24&15]+n[i%3E%3E4&15]+n[15&i]+n[i%3E%3E12&15]+n[i%3E%3E8&15]+n[i%3E%3E20&15]+n[i%3E%3E16&15]+n[i%3E%3E28&15]+n[i%3E%3E24&15]},t.prototype.toString=t.prototype.hex,t.prototype.digest=function(){this.finalize();var%20t=this.h0,r=this.h1,e=this.h2,i=this.h3;return[255&t,t%3E%3E8&255,t%3E%3E16&255,t%3E%3E24&255,255&r,r%3E%3E8&255,r%3E%3E16&255,r%3E%3E24&255,255&e,e%3E%3E8&255,e%3E%3E16&255,e%3E%3E24&255,255&i,i%3E%3E8&255,i%3E%3E16&255,i%3E%3E24&255]},t.prototype.array=t.prototype.digest,t.prototype.arrayBuffer=function(){this.finalize();var%20t=new%20ArrayBuffer(16),r=new%20Uint32Array(t);return%20r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,t},t.prototype.buffer=t.prototype.arrayBuffer,t.prototype.base64=function(){for(var%20t,r,e,i=%22%22,s=this.array(),h=0;h%3C15;)t=s[h++],r=s[h++],e=s[h++],i+=p[t%3E%3E%3E2]+p[63&(t%3C%3C4|r%3E%3E%3E4)]+p[63&(r%3C%3C2|e%3E%3E%3E6)]+p[63&e];return%20t=s[h],i+=p[t%3E%3E%3E2]+p[t%3C%3C4&63]+%22==%22};var%20_=v();f?module.exports=_:(i.md5=_,o&&define(function(){return%20_}))}();`;scr.id=%22_meta_md5%22;document.body.appendChild(scr);};async%20function%20upload(image,extension){var%20hash=md5(image);var%20type=extension;try{var%20res=await%20fetch(%22https://assets.scratch.mit.edu/%22+hash+%22.%22+type,{body:image,method:%22POST%22,mode:%22cors%22,credentials:%22include%22});var%20data=await%20res.json();if(data.status===%22ok%22){if(document.getElementById(%22id_body%22)){document.getElementById(%22id_body%22).value=document.getElementById(%22id_body%22).value+%22[img]https://assets.scratch.mit.edu/get_image/\x2e\x25\x32\x45/%22+data[%22content-name%22]+%22[/img]%22;}else{prompt(%22Your%20image%20has%20been%20uploaded!%22,%22https://assets.scratch.mit.edu/get_image/\x2e\x25\x32\x45/%22+data[%22content-name%22]);}}else{alert(%22The%20scratch%20servers%20didn%27t%20accept%20your%20image%20for%20some%20reason%20:(%22);}}catch(err){alert(%22Error%20on%20uploading%20image!%20Errors:%22+err);}};var%20input=document.createElement(%22input%22);input.type=%22file%22;input.accept=%22image/*%22;input.style.display=%22none%22;input.click();input.addEventListener(%22change%22,(e)=%3E{var%20file=input.files[0];var%20extension=input.files[0].name.split(%22.%22).pop().toLowerCase();var%20reader=new%20FileReader();reader.readAsArrayBuffer(file);reader.onloadend=function(){upload(reader.result,extension);input.remove();};reader.onerror=(err)=%3E{alert(%22We%20can%27t%20upload%20your%20file%20at%20the%20moment.%22);}}); - click the bookmark anywhere (on the Scratch forums) where you want to upload your image
- done
- winterwolfy
-
Scratcher
1000+ posts
how do you use the scratch assets thing to show pictures in the forums?
THANK YOU! ^w^
- triple-click this code and drag it to your bookmarks bar:
javascript: if(!document.getElementById("_meta_md5")){var scr=document.createElement("script");scr.innerHTML=`!function(){"use strict";function t(t){if(t)d[0]=d[16]=d[1]=d[2]=d[3]=d[4]=d[5]=d[6]=d[7]=d[8]=d[9]=d[10]=d[11]=d[12]=d[13]=d[14]=d[15]=0,this.blocks=d,this.buffer8=l;else if(a){var r=new ArrayBuffer(68);this.buffer8=new Uint8Array(r),this.blocks=new Uint32Array(r)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}var r="input is invalid type",e="object"==typeof window,i=e?window:{};i.JS_MD5_NO_WINDOW&&(e=!1);var%20s=!e&&%22object%22==typeof%20self,h=!i.JS_MD5_NO_NODE_JS&&%22object%22==typeof%20process&&process.versions&&process.versions.node;h?i=global:s&&(i=self);var%20f=!i.JS_MD5_NO_COMMON_JS&&%22object%22==typeof%20module&&module.exports,o=%22function%22==typeof%20define&&define.amd,a=!i.JS_MD5_NO_ARRAY_BUFFER&&%22undefined%22!=typeof%20ArrayBuffer,n=%220123456789abcdef%22.split(%22%22),u=[128,32768,8388608,-2147483648],y=[0,8,16,24],c=[%22hex%22,%22array%22,%22digest%22,%22buffer%22,%22arrayBuffer%22,%22base64%22],p=%22ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/%22.split(%22%22),d=[],l;if(a){var%20A=new%20ArrayBuffer(68);l=new%20Uint8Array(A),d=new%20Uint32Array(A)}!i.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return%22[object%20Array]%22===Object.prototype.toString.call(t)}),!a||!i.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return%22object%22==typeof%20t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var%20b=function(r){return%20function(e){return%20new%20t(!0).update(e)[r]()}},v=function(){var%20r=b(%22hex%22);h&&(r=w(r)),r.create=function(){return%20new%20t},r.update=function(t){return%20r.create().update(t)};for(var%20e=0;e%3Cc.length;++e){var%20i=c[e];r[i]=b(i)}return%20r},w=function(t){var%20e=eval(%22require(%27crypto%27)%22),i=eval(%22require(%27buffer%27).Buffer%22),s=function(s){if(%22string%22==typeof%20s)return%20e.createHash(%22md5%22).update(s,%22utf8%22).digest(%22hex%22);if(null===s||void%200===s)throw%20r;return%20s.constructor===ArrayBuffer&&(s=new%20Uint8Array(s)),Array.isArray(s)||ArrayBuffer.isView(s)||s.constructor===i?e.createHash(%22md5%22).update(new%20i(s)).digest(%22hex%22):t(s)};return%20s};t.prototype.update=function(t){if(!this.finalized){var%20e,i=typeof%20t;if(%22string%22!==i){if(%22object%22!==i)throw%20r;if(null===t)throw%20r;if(a&&t.constructor===ArrayBuffer)t=new%20Uint8Array(t);else%20if(!(Array.isArray(t)||a&&ArrayBuffer.isView(t)))throw%20r;e=!0}for(var%20s,h,f=0,o=t.length,n=this.blocks,u=this.buffer8;f%3Co;){if(this.hashed&&(this.hashed=!1,n[0]=n[16],n[16]=n[1]=n[2]=n[3]=n[4]=n[5]=n[6]=n[7]=n[8]=n[9]=n[10]=n[11]=n[12]=n[13]=n[14]=n[15]=0),e)if(a)for(h=this.start;f%3Co&&h%3C64;++f)u[h++]=t[f];else%20for(h=this.start;f%3Co&&h%3C64;++f)n[h%3E%3E2]|=t[f]%3C%3Cy[3&h++];else%20if(a)for(h=this.start;f%3Co&&h%3C64;++f)(s=t.charCodeAt(f))%3C128?u[h++]=s:s%3C2048?(u[h++]=192|s%3E%3E6,u[h++]=128|63&s):s%3C55296||s%3E=57344?(u[h++]=224|s%3E%3E12,u[h++]=128|s%3E%3E6&63,u[h++]=128|63&s):(s=65536+((1023&s)%3C%3C10|1023&t.charCodeAt(++f)),u[h++]=240|s%3E%3E18,u[h++]=128|s%3E%3E12&63,u[h++]=128|s%3E%3E6&63,u[h++]=128|63&s);else%20for(h=this.start;f%3Co&&h%3C64;++f)(s=t.charCodeAt(f))%3C128?n[h%3E%3E2]|=s%3C%3Cy[3&h++]:s%3C2048?(n[h%3E%3E2]|=(192|s%3E%3E6)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|63&s)%3C%3Cy[3&h++]):s%3C55296||s%3E=57344?(n[h%3E%3E2]|=(224|s%3E%3E12)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|s%3E%3E6&63)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|63&s)%3C%3Cy[3&h++]):(s=65536+((1023&s)%3C%3C10|1023&t.charCodeAt(++f)),n[h%3E%3E2]|=(240|s%3E%3E18)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|s%3E%3E12&63)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|s%3E%3E6&63)%3C%3Cy[3&h++],n[h%3E%3E2]|=(128|63&s)%3C%3Cy[3&h++]);this.lastByteIndex=h,this.bytes+=h-this.start,h%3E=64?(this.start=h-64,this.hash(),this.hashed=!0):this.start=h}return%20this.bytes%3E4294967295&&(this.hBytes+=this.bytes/4294967296%3C%3C0,this.bytes=this.bytesB94967296),this}},t.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var%20t=this.blocks,r=this.lastByteIndex;t[r%3E%3E2]|=u[3&r],r%3E=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes%3C%3C3,t[15]=this.hBytes%3C%3C3|this.bytes%3E%3E%3E29,this.hash()}},t.prototype.hash=function(){var%20t,r,e,i,s,h,f=this.blocks;this.first?r=((r=((t=((t=f[0]-680876937)%3C%3C7|t%3E%3E%3E25)-271733879%3C%3C0)^(e=((e=(-271733879^(i=((i=(-1732584194^2004318071&t)+f[1]-117830708)%3C%3C12|i%3E%3E%3E20)+t%3C%3C0)&(-271733879^t))+f[2]-1126478375)%3C%3C17|e%3E%3E%3E15)+i%3C%3C0)&(i^t))+f[3]-1316259209)%3C%3C22|r%3E%3E%3E10)+e%3C%3C0:(t=this.h0,r=this.h1,e=this.h2,r=((r+=((t=((t+=((i=this.h3)^r&(e^i))+f[0]-680876936)%3C%3C7|t%3E%3E%3E25)+r%3C%3C0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+f[1]-389564586)%3C%3C12|i%3E%3E%3E20)+t%3C%3C0)&(t^r))+f[2]+606105819)%3C%3C17|e%3E%3E%3E15)+i%3C%3C0)&(i^t))+f[3]-1044525330)%3C%3C22|r%3E%3E%3E10)+e%3C%3C0),r=((r+=((t=((t+=(i^r&(e^i))+f[4]-176418897)%3C%3C7|t%3E%3E%3E25)+r%3C%3C0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+f[5]+1200080426)%3C%3C12|i%3E%3E%3E20)+t%3C%3C0)&(t^r))+f[6]-1473231341)%3C%3C17|e%3E%3E%3E15)+i%3C%3C0)&(i^t))+f[7]-45705983)%3C%3C22|r%3E%3E%3E10)+e%3C%3C0,r=((r+=((t=((t+=(i^r&(e^i))+f[8]+1770035416)%3C%3C7|t%3E%3E%3E25)+r%3C%3C0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+f[9]-1958414417)%3C%3C12|i%3E%3E%3E20)+t%3C%3C0)&(t^r))+f[10]-42063)%3C%3C17|e%3E%3E%3E15)+i%3C%3C0)&(i^t))+f[11]-1990404162)%3C%3C22|r%3E%3E%3E10)+e%3C%3C0,r=((r+=((t=((t+=(i^r&(e^i))+f[12]+1804603682)%3C%3C7|t%3E%3E%3E25)+r%3C%3C0)^(e=((e+=(r^(i=((i+=(e^t&(r^e))+f[13]-40341101)%3C%3C12|i%3E%3E%3E20)+t%3C%3C0)&(t^r))+f[14]-1502002290)%3C%3C17|e%3E%3E%3E15)+i%3C%3C0)&(i^t))+f[15]+1236535329)%3C%3C22|r%3E%3E%3E10)+e%3C%3C0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+f[1]-165796510)%3C%3C5|t%3E%3E%3E27)+r%3C%3C0)^r))+f[6]-1069501632)%3C%3C9|i%3E%3E%3E23)+t%3C%3C0)^t&((e=((e+=(t^r&(i^t))+f[11]+643717713)%3C%3C14|e%3E%3E%3E18)+i%3C%3C0)^i))+f[0]-373897302)%3C%3C20|r%3E%3E%3E12)+e%3C%3C0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+f[5]-701558691)%3C%3C5|t%3E%3E%3E27)+r%3C%3C0)^r))+f[10]+38016083)%3C%3C9|i%3E%3E%3E23)+t%3C%3C0)^t&((e=((e+=(t^r&(i^t))+f[15]-660478335)%3C%3C14|e%3E%3E%3E18)+i%3C%3C0)^i))+f[4]-405537848)%3C%3C20|r%3E%3E%3E12)+e%3C%3C0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+f[9]+568446438)%3C%3C5|t%3E%3E%3E27)+r%3C%3C0)^r))+f[14]-1019803690)%3C%3C9|i%3E%3E%3E23)+t%3C%3C0)^t&((e=((e+=(t^r&(i^t))+f[3]-187363961)%3C%3C14|e%3E%3E%3E18)+i%3C%3C0)^i))+f[8]+1163531501)%3C%3C20|r%3E%3E%3E12)+e%3C%3C0,r=((r+=((i=((i+=(r^e&((t=((t+=(e^i&(r^e))+f[13]-1444681467)%3C%3C5|t%3E%3E%3E27)+r%3C%3C0)^r))+f[2]-51403784)%3C%3C9|i%3E%3E%3E23)+t%3C%3C0)^t&((e=((e+=(t^r&(i^t))+f[7]+1735328473)%3C%3C14|e%3E%3E%3E18)+i%3C%3C0)^i))+f[12]-1926607734)%3C%3C20|r%3E%3E%3E12)+e%3C%3C0,r=((r+=((h=(i=((i+=((s=r^e)^(t=((t+=(s^i)+f[5]-378558)%3C%3C4|t%3E%3E%3E28)+r%3C%3C0))+f[8]-2022574463)%3C%3C11|i%3E%3E%3E21)+t%3C%3C0)^t)^(e=((e+=(h^r)+f[11]+1839030562)%3C%3C16|e%3E%3E%3E16)+i%3C%3C0))+f[14]-35309556)%3C%3C23|r%3E%3E%3E9)+e%3C%3C0,r=((r+=((h=(i=((i+=((s=r^e)^(t=((t+=(s^i)+f[1]-1530992060)%3C%3C4|t%3E%3E%3E28)+r%3C%3C0))+f[4]+1272893353)%3C%3C11|i%3E%3E%3E21)+t%3C%3C0)^t)^(e=((e+=(h^r)+f[7]-155497632)%3C%3C16|e%3E%3E%3E16)+i%3C%3C0))+f[10]-1094730640)%3C%3C23|r%3E%3E%3E9)+e%3C%3C0,r=((r+=((h=(i=((i+=((s=r^e)^(t=((t+=(s^i)+f[13]+681279174)%3C%3C4|t%3E%3E%3E28)+r%3C%3C0))+f[0]-358537222)%3C%3C11|i%3E%3E%3E21)+t%3C%3C0)^t)^(e=((e+=(h^r)+f[3]-722521979)%3C%3C16|e%3E%3E%3E16)+i%3C%3C0))+f[6]+76029189)%3C%3C23|r%3E%3E%3E9)+e%3C%3C0,r=((r+=((h=(i=((i+=((s=r^e)^(t=((t+=(s^i)+f[9]-640364487)%3C%3C4|t%3E%3E%3E28)+r%3C%3C0))+f[12]-421815835)%3C%3C11|i%3E%3E%3E21)+t%3C%3C0)^t)^(e=((e+=(h^r)+f[15]+530742520)%3C%3C16|e%3E%3E%3E16)+i%3C%3C0))+f[2]-995338651)%3C%3C23|r%3E%3E%3E9)+e%3C%3C0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+f[0]-198630844)%3C%3C6|t%3E%3E%3E26)+r%3C%3C0)|~e))+f[7]+1126891415)%3C%3C10|i%3E%3E%3E22)+t%3C%3C0)^((e=((e+=(t^(i|~r))+f[14]-1416354905)%3C%3C15|e%3E%3E%3E17)+i%3C%3C0)|~t))+f[5]-57434055)%3C%3C21|r%3E%3E%3E11)+e%3C%3C0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+f[12]+1700485571)%3C%3C6|t%3E%3E%3E26)+r%3C%3C0)|~e))+f[3]-1894986606)%3C%3C10|i%3E%3E%3E22)+t%3C%3C0)^((e=((e+=(t^(i|~r))+f[10]-1051523)%3C%3C15|e%3E%3E%3E17)+i%3C%3C0)|~t))+f[1]-2054922799)%3C%3C21|r%3E%3E%3E11)+e%3C%3C0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+f[8]+1873313359)%3C%3C6|t%3E%3E%3E26)+r%3C%3C0)|~e))+f[15]-30611744)%3C%3C10|i%3E%3E%3E22)+t%3C%3C0)^((e=((e+=(t^(i|~r))+f[6]-1560198380)%3C%3C15|e%3E%3E%3E17)+i%3C%3C0)|~t))+f[13]+1309151649)%3C%3C21|r%3E%3E%3E11)+e%3C%3C0,r=((r+=((i=((i+=(r^((t=((t+=(e^(r|~i))+f[4]-145523070)%3C%3C6|t%3E%3E%3E26)+r%3C%3C0)|~e))+f[11]-1120210379)%3C%3C10|i%3E%3E%3E22)+t%3C%3C0)^((e=((e+=(t^(i|~r))+f[2]+718787259)%3C%3C15|e%3E%3E%3E17)+i%3C%3C0)|~t))+f[9]-343485551)%3C%3C21|r%3E%3E%3E11)+e%3C%3C0,this.first?(this.h0=t+1732584193%3C%3C0,this.h1=r-271733879%3C%3C0,this.h2=e-1732584194%3C%3C0,this.h3=i+271733878%3C%3C0,this.first=!1):(this.h0=this.h0+t%3C%3C0,this.h1=this.h1+r%3C%3C0,this.h2=this.h2+e%3C%3C0,this.h3=this.h3+i%3C%3C0)},t.prototype.hex=function(){this.finalize();var%20t=this.h0,r=this.h1,e=this.h2,i=this.h3;return%20n[t%3E%3E4&15]+n[15&t]+n[t%3E%3E12&15]+n[t%3E%3E8&15]+n[t%3E%3E20&15]+n[t%3E%3E16&15]+n[t%3E%3E28&15]+n[t%3E%3E24&15]+n[r%3E%3E4&15]+n[15&r]+n[r%3E%3E12&15]+n[r%3E%3E8&15]+n[r%3E%3E20&15]+n[r%3E%3E16&15]+n[r%3E%3E28&15]+n[r%3E%3E24&15]+n[e%3E%3E4&15]+n[15&e]+n[e%3E%3E12&15]+n[e%3E%3E8&15]+n[e%3E%3E20&15]+n[e%3E%3E16&15]+n[e%3E%3E28&15]+n[e%3E%3E24&15]+n[i%3E%3E4&15]+n[15&i]+n[i%3E%3E12&15]+n[i%3E%3E8&15]+n[i%3E%3E20&15]+n[i%3E%3E16&15]+n[i%3E%3E28&15]+n[i%3E%3E24&15]},t.prototype.toString=t.prototype.hex,t.prototype.digest=function(){this.finalize();var%20t=this.h0,r=this.h1,e=this.h2,i=this.h3;return[255&t,t%3E%3E8&255,t%3E%3E16&255,t%3E%3E24&255,255&r,r%3E%3E8&255,r%3E%3E16&255,r%3E%3E24&255,255&e,e%3E%3E8&255,e%3E%3E16&255,e%3E%3E24&255,255&i,i%3E%3E8&255,i%3E%3E16&255,i%3E%3E24&255]},t.prototype.array=t.prototype.digest,t.prototype.arrayBuffer=function(){this.finalize();var%20t=new%20ArrayBuffer(16),r=new%20Uint32Array(t);return%20r[0]=this.h0,r[1]=this.h1,r[2]=this.h2,r[3]=this.h3,t},t.prototype.buffer=t.prototype.arrayBuffer,t.prototype.base64=function(){for(var%20t,r,e,i=%22%22,s=this.array(),h=0;h%3C15;)t=s[h++],r=s[h++],e=s[h++],i+=p[t%3E%3E%3E2]+p[63&(t%3C%3C4|r%3E%3E%3E4)]+p[63&(r%3C%3C2|e%3E%3E%3E6)]+p[63&e];return%20t=s[h],i+=p[t%3E%3E%3E2]+p[t%3C%3C4&63]+%22==%22};var%20_=v();f?module.exports=_:(i.md5=_,o&&define(function(){return%20_}))}();`;scr.id=%22_meta_md5%22;document.body.appendChild(scr);};async%20function%20upload(image,extension){var%20hash=md5(image);var%20type=extension;try{var%20res=await%20fetch(%22https://assets.scratch.mit.edu/%22+hash+%22.%22+type,{body:image,method:%22POST%22,mode:%22cors%22,credentials:%22include%22});var%20data=await%20res.json();if(data.status===%22ok%22){if(document.getElementById(%22id_body%22)){document.getElementById(%22id_body%22).value=document.getElementById(%22id_body%22).value+%22[img]https://assets.scratch.mit.edu/get_image/\x2e\x25\x32\x45/%22+data[%22content-name%22]+%22[/img]%22;}else{prompt(%22Your%20image%20has%20been%20uploaded!%22,%22https://assets.scratch.mit.edu/get_image/\x2e\x25\x32\x45/%22+data[%22content-name%22]);}}else{alert(%22The%20scratch%20servers%20didn%27t%20accept%20your%20image%20for%20some%20reason%20:(%22);}}catch(err){alert(%22Error%20on%20uploading%20image!%20Errors:%22+err);}};var%20input=document.createElement(%22input%22);input.type=%22file%22;input.accept=%22image/*%22;input.style.display=%22none%22;input.click();input.addEventListener(%22change%22,(e)=%3E{var%20file=input.files[0];var%20extension=input.files[0].name.split(%22.%22).pop().toLowerCase();var%20reader=new%20FileReader();reader.readAsArrayBuffer(file);reader.onloadend=function(){upload(reader.result,extension);input.remove();};reader.onerror=(err)=%3E{alert(%22We%20can%27t%20upload%20your%20file%20at%20the%20moment.%22);}});- click the bookmark anywhere (on the Scratch forums) where you want to upload your image
- done
- Discussion Forums
- » Questions about Scratch
-
» how do you use the scratch assets thing to show pictures in the forums?


