Basically what it does is it creates a link to download photo albums from Facebook. I'm far from finished but anyway, here's my code so far.
The format of the HTML code block where the URLs of pics are.
And here's my script so far,
<i style="background-image: url(https://fbcdn-photos-a.akamaihd.net/hphotos-ak-ash4/299595_10150290138650735_543370734_8021370_355110168_a.jpg);"></i>
I have created a fiddle so that it all would be clearer.
var URLset = ;
for(var i=0; i<picURL.length; i++)
//gets all the URLs in the page
picURL = document.getElementsByClassName("tagWrapper").children.style.backgroundImage;
URLset.push(modURL); //inserting them to an array
//doing the replacements to make them downloadable
modURL = picURL.replace("url(", "").replace(")", "");
modURL = modURL.replace("a.jpg", "n.jpg");
var dwn = "?dl=1";
modURL = modURL.concat(dwn);
Since I'm half way through it, I just want to make sure it works up to this point so I have put an alert box to show all the modified URLs stored in the array. (supposed to, at least) the problem is, it isn't showing up.
Can anyone please tell me what I have done wrong here? Bare with me for I'm still new to this like I said before. Any help in the right direction would be much appreciated.
Thanks in advance.