Skip to content

Commit

Permalink
Updated image URL input
Browse files Browse the repository at this point in the history
  • Loading branch information
jwyg committed Jun 20, 2020
1 parent 3b90a38 commit 39847ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion image-slice/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ function preload() {
urls = urls.split("\n"); //every line contains a new url
for(let i=0; i<urls.length; i++){
if(urls[i].trim()!=""){
imagesStack[i] = loadImage(urls[i]); //load images from localstorage lines
imagesStack[i] = loadImage(urls[i],null,(e)=>{
alert("One or more urls failed to load. Please try again or double check the urls.");
localStorage.removeItem("urls");
location.reload();
}); //load images from localstorage lines
}
}
}
Expand Down

0 comments on commit 39847ae

Please sign in to comment.