View difference between Paste ID: NfumdPt0 and y1tStgYn
SHOW: | | - or go back to the newest paste.
1-
var page=2,page_size=20;
1+
var page=1,page_size=20,tag="popular";
2
var data1=document.createElement("div");document.body.innerHTML="";document.body.appendChild(data1);
3
for (var i=(page-1)*page_size+1;i<=page*page_size;i++){
4-
var r=new XMLHttpRequest();r.open("GET","http://users1.jabry.com/rg443/f5i.asp?q=rg443/favorites&p="+i);
4+
var r=new XMLHttpRequest();r.open("GET","http://users1.jabry.com/rg443/f5i.asp?q="+tag+"&p="+i);
5
r.i=i;
6
r.onreadystatechange=function(){
7
if (this.readyState!=4 || this.status!=200) return;
8
var s=this.responseText.match(/(http.*.jpg)/gim).join("\n").replace(/(http:\/\/pcdn.500px.net\/)(.*.jpg)/gim,'<img src="http://127.0.0.'+ (~~(Math.random()*10)+1)+'/5x/$2" alt="500px" width="280" height="280"/>');
9
setTimeout(function(){data1.insertAdjacentHTML("beforeEnd",s)},50);
10
console.log(this.i,(""+this.responseText).split("\n").length);
11
12
post_imgur(this.responseText.match(/(http.*.jpg)/gim).join("\n").replace(/\/3.jpg/gim,"/4.jpg").match(/(http.*.jpg)/gim),function(){console.log("imgur: " +this.toString().split("\n").length)});
13
14
}
15
r.send();
16
17
}
18
19
20
/* upload imgur */
21
function post_imgur(a,callback) {	  
22
var r=new XMLHttpRequest();
23
r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
24
//r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
25
r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
26
r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback.call(this.responseText); }
27
r.send("u=" + a.join(","));
28
}