PDA

View Full Version : simple jquery help



Rambo
01-21-2015, 06:53 PM
code:

var el = document.getElementsByTagName("a");
if(window.location.hostname != "buka.link"){
for(var i=0;i<el.length;i++){
$.get( el[i], data);
// problem is the line above and below doesn't seem to work...
if ~data.indexOf('This domain is blocked.'){
el[i].href = el[i].href.replace("[Only registered and activated users can see links]", "");
el[i].href = el[i].href.replace("[Only registered and activated users can see links]", "");
el[i].href = "[Only registered and activated users can see links]" + el[i].href;
}
}
}

(jquery 1.11.x is included)

Reemer
01-24-2015, 05:53 PM
What about it doesn't work? Is the string incorrect or is the page not loading or something? I don't know much about jquery, but I might be able to help with a little more detail.

Rambo
01-25-2015, 01:57 PM
Seems super slow.