rg443

listal_preview (paging)

May 24th, 2013
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var j= j||8913452;
  2. var pageSize=450;
  3. function grid_preview(start){
  4. if (!start) start=6087172;
  5. //for (var a=[],i=start;i>start-pageSize;i--) {a.push('<img src="http://i'+ i%3 + '.wp.com/i2.listal.com/image/'+i+'/320full.jpg?resize=320,200" style="width:320px;height:200px" onerror="rem3(this)" />'); if (i==1) break;}
  6. if (/cdn=1/.test(document.cookie)) {
  7. for (var a=[],i=start;i>start-pageSize;i--) {a.push('<img src="http://127.0.0.'+ (i%9+1) + '/wp1/i2.listal.com/image/'+i+'/800full.jpg?resize=240,320" style="width:240px;height:320px;margin:2px;border-radius:10px;" onerror="rem3(this)" />'); if (i==1) break;}
  8.  
  9.  
  10. } else {
  11. for (var a=[],i=start;i>start-pageSize;i--) {a.push('<img src="http://i'+ i%3 + '.wp.com/i2.listal.com/image/'+i+'/800full.jpg?resize=240,320" style="width:240px;height:320px;margin:2px;border-radius:10px;" onerror="rem3(this)" />'); if (i==1) break;}
  12. }
  13. window.stop();
  14. document.body.innerHTML=a.join("");
  15. document.body.insertAdjacentHTML("beforeEnd",'<br><a href="#" onclick="grid_preview(j-=pageSize);setTimeout(window.scroll,200,0,0);return false;" style="font:menu;font-size:14pt;color:black;text-decoration:none;">more</a>');
  16. document.body.insertAdjacentHTML("beforeEnd",'<a href="#" onclick="grid_preview(j+=pageSize);setTimeout(window.scroll,200,0,0);return false;" style="font:menu;font-size:9pt;color:black;text-decoration:none;margin-left:10px;" title="scroll back"> scroll back </a>');
  17. document.title="listal - " +start;
  18.  
  19. }
  20. function rem1(el){setTimeout(function(){el.parentElement.removeChild(el)},100);}
  21. function rem2(el){el.style.display="none";}
  22. function rem3(el){el.style.visibility="hidden";}
  23.  
  24. grid_preview(j);
  25. document.onkeypress=function(e){if (e.keyCode==106){grid_preview(j-=pageSize);setTimeout(window.scroll,200,0,0);};if (e.keyCode==107){grid_preview(j+=pageSize);setTimeout(window.scroll,200,0,0);}};
  26.  
  27. // var r=document.createElement("input");r.type="range",r.min=1;r.max=5367501;r.value=j;r.step=450;r.style.width="1200px"; document.body.appendChild(r); r.onmouseup=function(){j=(this.value);this.title=this.value;grid_preview(j)};
Advertisement
Add Comment
Please, Sign In to add comment