This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git reset --hard HEAD #reset to head commit | |
git clean -fdx #removes all untracked too |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function downloadImage(imageSrc, fName) { | |
const image = await fetch(imageSrc) | |
const imageBlog = await image.blob() | |
const imageURL = URL.createObjectURL(imageBlog) | |
const link = document.createElement('a') | |
link.href = imageURL | |
link.download = fName | |
document.body.appendChild(link) | |
link.click() |