Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // http://www.wallpowper.com/wallpaper/2013/04/30/
- var b=document.body.innerHTML.match(/<a href="(\S+\.jpg)">/gim).map(function(v){return v.match(/<a href="(\S+\.jpg)">/i)[1] });a;
- var a=b.map(function(v){return location.origin+location.pathname+v});
- post_imgur(a,print1);
- function print1(){console.log("imgur",a.length,this.toString().split("\n").length-1)};
- /* upload imgur */
- function post_imgur(a,callback) {
- var r=new XMLHttpRequest();
- r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
- //r.open("POST","http://notebook1.lan:8000/jabry/imgur1.asp?u=&b=",true);
- r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback.call(this.responseText); }
- r.send("u=" + a.join(","));
- }
- /* fetch url */
- function get_url(url,callback) {
- var r=new XMLHttpRequest();
- r.open("GET",url,true);
- r.onreadystatechange=function(){
- if (this.readyState==4 && this.status==200) callback.call(this.responseText);
- }
- r.send();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement