Commit 771fa049 authored by ronald's avatar ronald

Make sure will alert user finish downloading

parent a3635a5d
......@@ -27,6 +27,10 @@ chrome.extension.onMessage.addListener(function(request,sender,sendResponse){
}
console.log("Current index : ", index);
console.log("Current noImages : " , noImages);
if(index >= skus.length-1) {
console.log("Last file was downloaded");
alert(noImages);
}
});
chrome.downloads.onDeterminingFilename.addListener(function(item, suggest) {
......
......@@ -88,6 +88,10 @@ if (link.match(/login/g)){
chrome.runtime.sendMessage({noImage : "true", currentSku : currentSku});
return;
}
else {
console.log("First List : ", downloadlist);
console.log("Downloading first list");
}
// To prevent file loss for duplicate images name in zip file, will download twice for one sku
// Duplicated files download at second file "sku(copy).zip"
var nameList = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment