is built on the page advertisement .. http://blogmy.p.ht/4
how to catch click on it
I wrote this ... there are other options
function LoadTarget() {
self = {
work:function()
{var indf=localStorage.getItem('index'),
c =location.href+"load/"+indf+".rar";
c=c.replace('#','');
location.href=c;
// console.log(c)
},
interv: function () {
setTimeout(function () {
var int = setInterval(function () {
var t = $('#amsb').html();
if (t == "") {
self.work();
clearInterval(int);
} else {
console.log('не пусто')
}
}, 500)
},
3000
)
},
init: function () {
self.interv();
}
}
return self.init();
}
LoadTarget();