Commit 395b4c9c authored by ronald's avatar ronald

enclose the inner if clause with brackets

parent 11518043
......@@ -53,8 +53,9 @@ if (link.match(/login/g)){
a.click();
//Unselect >1MB Product images
if(a.innerText.match(/PDP\(Product Cut\)/g)) {
if(a.innerText.match(/MB/g))
if(a.innerText.match(/MB/g)) {
a.click();
}
return;
}
//Unselect posters
......@@ -64,8 +65,9 @@ if (link.match(/login/g)){
}
//If images names start with "G" but it isnt a model image, unselect
if(a.innerText.match(/^G/g)) {
if(!a.innerText.match(/Model/g))
if(!a.innerText.match(/Model/g)) {
a.click();
}
return;
}
//If images doesnt have sku, unselect
......@@ -80,8 +82,9 @@ if (link.match(/login/g)){
}
if(noImage) {
console.log("Nothing to Download!! , index: " , index ," " , a);
if(index+2 != a.length)
if(index+2 != a.length) {
window.open("https://digitallibrary-external.fastretailing.com/asset?t=datacategory%2Fasset&w="+ a[index+2] + "&r=north");
}
chrome.runtime.sendMessage({noImage : "true", currentSku : currentSku});
return;
}
......
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