What should I add to this code assignments change the caption of the photo.
- Code:
$(function() {
var replace1 = 'Трябва да си регистриран за да виждаш линковете..';
var replace2 = 'Вие нямате права за сваляне !';
var replace3 = '$1Свален $2 пъти.';
var post = $('.postbody div');
var atbox = $('.attachbox');
var reg1 = /\[You must be.*?to see this [A-Z]+.\]/ig;
var reg2 = /You don't have permission to download attachments./ig;
var reg3 = /(\(\d+ [A-Z]+\)) Downloaded (\d+) times/ig;
for (i=0;i<post.length;i++)if(reg1.test(post[i].innerHTML))post[i].innerHTML=post[i].innerHTML.replace(reg1,replace1);
for (i=0;i<atbox.length;i++)if(reg2.test(atbox[i].innerHTML) || reg3.test(atbox[i].innerHTML))atbox[i].innerHTML=atbox[i].innerHTML.replace(reg2,replace2).replace(reg3,replace3);
});