You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// https://stackoverflow.com/a/38936042/582995functiondataURLtoFile(dataurl,filename){vararr=dataurl.split(','),mime=arr[0].match(/:(.*?);/)[1],bstr=atob(arr[1]),n=bstr.length,u8arr=newUint8Array(n);while(n--){u8arr[n]=bstr.charCodeAt(n);}returnnewFile([u8arr],filename,{type:mime});}html2canvas(document.querySelector("#render-area")).then(canvas=>{constdataURL=canvas.toDataURL("image/png",1.0);constfile=dataURLtoFile(dataURL);// upload to the gist});
The text was updated successfully, but these errors were encountered:
Usually when we share a REPL example we get a preview like this:
which is not very useful/informative of the shared example. We might then capture a thumbnail of the gist in the gist itself.
This might also improve the search experience.
Tentative/Pseudo Implementation
We might try html2canvas:
The text was updated successfully, but these errors were encountered: