Advertisement
rg443

all-hd-wallpapers.com grid (paging)

Jun 12th, 2013
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var pageSize=20,tag;
  2. tag= "abstract aircraft animals anime architecture boats cars entertainment general motorcycles nature people space sports technology videogames".match(/\S+/g)[15]; tag="all";
  3. // search-result-for-flowers
  4. //document.body.innerHTML="";document.head.innerHTML="";
  5. //for (var i=1,t=new Date();i<=pageSize;i++) setTimeout(get_url,i*250,"http://users1.jabry.com/rg443/text.asp?url=http://www.all-hd-wallpapers.com/people/pag-"+i,parse1);
  6. if (!data1) {var data1=document.createElement("div");document.body.insertAdjacentElement("afterBegin",data1)}; data1.innerHTML="";data1.style.marginLeft="140px";data1.style.cursor="pointer"; data1.style.width="1298px"; data1.style.minHeight="28560px";data1.style.overflowY="visible";
  7. if (!next1) {var next1=document.createElement("span");next1.innerText="more..."; var n=next1.style; n.font="16pt Arial";n.color="blue";n.cursor="pointer";n.marginLeft=data1.style.marginLeft; data1.insertAdjacentElement("AfterEnd",next1);}
  8.  
  9.  
  10. function parse1(){
  11.   // var a=this.match(/\/wallpapers\/\S+\d+.jpg/gim),b=a.map(function(v,i){var x=v.match(/\d+/); return '<img src="'+"http://i"+(x%3)+".wp.com/www.all-hd-wallpapers.com"+v+'?resize=320,200" style="width:320px;height:200px;margin:2px;"/>'});data1.insertAdjacentHTML("beforeEnd",b.join(""));
  12.   // var a=this.match(/\/wallpapers\/\S+\d+.jpg/gim),b=a.map(function(v,i){var x=v.match(/\d+/); return '<img src="'+"http://www.all-hd-wallpapers.com"+v+'" style="width:320px;height:200px;margin:2px;border-radius:10px;image-rendering: optimizeQuality;"/>'});data1.insertAdjacentHTML("beforeEnd",b.join(""));
  13.   var a=this.match(/\/wallpapers\/\S+\d+.jpg/gim)||[],b=a.map(function(v,i){var x=v.match(/\d+/); return '<img src="http://127.0.0.'+(x%10+1)+'/wp1/www.all-hd-wallpapers.com'+v+'?resize=320,200" style="width:320px;height:200px;margin:2px;border-radius:10px;image-rendering: optimizeQuality;"/>'
  14. });data1.insertAdjacentHTML("beforeEnd",b.join(""));
  15.  
  16. var tags=(this.match(/<h2>(.*)<\/h2>/gim)||[]).join(", ").replace(/<.*?>/gim,"").split(/, */gim).sort(function(a,b){return a.toLowerCase().localeCompare(b.toLowerCase())}).join(", "); console.log(tags);
  17.   }
  18.  
  19. data1.onclick=function(e){
  20.    var e=e.srcElement||e.target;
  21.    if (e.tagName!="IMG") return;
  22.    var w=window.open("about:blank");
  23.    w.document.body.innerHTML='<div style="box-shadow: 10px 10px 5px dimgray;border-radius:10px;image-rendering: optimizeQuality;position:absolute;left:10%;top:10%;width:80%;height:80%;background-repeat:no-repeat;background-position:left top;background-size: cover;background-image:url('+e.src+')"></div>';
  24.    setTimeout(function(){w.location="http://eho.st/"+e.src.match(/http\S+.jpg/)[0].replace(/\/mici/,"").replace(/127.0.0.\d+\/wp1\/|i\d+.wp.com/,"")},300);
  25.    }
  26.  
  27. next1.onclick=function(){
  28.    //post_imgur(data1.innerHTML.replace(/127.0.0.\d+\/wp1|i\d+.wp.com|\/mici/gim,"").match(/http\S+\.jpg/gim),function(){window.hl=this.toString();console.log("imgur: "+ hl.split("\n").length-1)});
  29.    window.scroll(0,0); // data1.offsetTop
  30.    data1.innerHTML="";if (window.stop)window.stop();
  31.    switch (tag){
  32.       case "":
  33.       case "all":
  34.         for (var i=j;i<j+pageSize;i++) setTimeout(get_url,(i-j-1)*200,"http://users1.jabry.com/rg443/text.asp?url=http://www.all-hd-wallpapers.com/view-wallpapers-as-list.php?page="+i,parse1);
  35.         break;
  36.       default:
  37.          for (var i=j;i<j+pageSize;i++) setTimeout(get_url,(i-j-1)*200,"http://users1.jabry.com/rg443/text.asp?url=http://www.all-hd-wallpapers.com/"+tag+"/pag-"+i,parse1);
  38.    }
  39.    // for (var i=j;i<j+pageSize;i++) setTimeout(get_url,(i-j-1)*500,"http://users1.jabry.com/rg443/text.asp?url=http://www.all-hd-wallpapers.com/"+tag+"/pag-"+i,parse1);
  40.    document.title= "allhdw: "+ tag +" - " +j;
  41.    j+=pageSize;
  42.    }
  43.  
  44. document.onkeyup=function(e){
  45.    //console.log(e.which , e.keyCode,document.height,window.pageYOffset,window.innerHeight)
  46.    // eof && pgdn
  47.    if (e.keyCode==34 && (document.height-window.pageYOffset-window.innerHeight)==0){next1.onclick();console.log("more");}
  48.    }
  49.  
  50. var j=1;
  51. next1.onclick();
  52.  
  53. function get_url(url,callback) {
  54.     var r=new XMLHttpRequest();
  55.     r.open("GET",url,true);
  56.     r.onreadystatechange=function(){
  57.        if (this.readyState==4 && this.status==200) callback.call(this.responseText);
  58.        }
  59.     r.send();      
  60.  
  61. }
  62. /* upload imgur */
  63. function post_imgur(a,callback) {    
  64. var r=new XMLHttpRequest();
  65. r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
  66. r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  67. r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback.call(this.responseText); }
  68. r.send("u=" + a.join(","));
  69. }
  70.  
  71. /*
  72.      data1.innerHTML.match(/http\S+\.jpg/gim).join("\n");
  73.      abstract aircraft animals anime architecture boats cars entertainment general motorcycles nature people space sports technology videogames
  74.      
  75.      index.php?page=1..8141 (12)
  76.      view-wallpapers-as-list.php?page=1..2850 (40)
  77.      nature/pag-1..2228 (15)
  78.      search-result-for- flowers woman
  79.      
  80.      disclaimer: All trademarks and copyrights are the property of their respective owners. Original images are copyrighted to their respectful owners. Please contact us if you feel your wallpaper has been posted without permission.
  81.  
  82. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement