Advertisement
rg443

wordpress -> post_imgur (location)

Oct 5th, 2013
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var url=location.href,i2=parseInt(url.match(/\d+/));url=url.replace(/\d+/,"$i");
  2. for (var i=i2;i>0;i--) setTimeout(function(i){
  3.    var r=new XMLHttpRequest();
  4.    r.i=i;
  5.    r.open("GET",url.replace("$i",i),true);
  6.    r.onload=function(){
  7.       var a=(this.response.match(/http[^=]+jpe*g/gim)||[]).map(function(v){return encodeURI(v.replace(/-\d+x\d+/,""))});
  8.       console.log(a.join("\n"),r.i);
  9.       post_imgur(a,function(){console.log(this.toString(),r.i);});
  10.       }
  11.    r.send();
  12.    
  13.    },(i2-i)*500,i);
  14.    
  15. function post_imgur(a,callback) {        
  16. var r=new XMLHttpRequest();
  17. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=&x=",true);
  18. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  19. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback.call(this.responseText); }
  20. r.send("u=" + a.join(","));
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement