Advertisement
rg443

grid_preview - imgur

May 10th, 2013
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var j=0, b=il.match(/\S+/gim).reverse(),bucket=bucket||512;
  2. function grid_preview(start){
  3. if (!start) start=0;
  4. for (var a=[],i=start;i<start+450;i++) {a.push('<img src="http://127.0.0.'+ (i%30+1) + '/wp1/i.imgur.com/'+b[i]+'l.jpg?resize=320,200" style="width:320px;height:200px" onerror="rem3(this)" />'); if (i>=b.length) break;}
  5. window.stop();
  6. document.body.innerHTML="<div style=\"width:1300px;\">" +a.join("")+"</div>";
  7. document.body.insertAdjacentHTML("beforeEnd",'<br><a href="#" onclick="grid_preview(j+=450);setTimeout(window.scroll,200,0,0);return false;" style="font:menu;font-size:14pt;color:black;text-decoration:none;">more</a>');
  8. document.body.insertAdjacentHTML("beforeEnd",'<a href="#" onclick="grid_preview(j-=450);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>');
  9. document.title="imgur1 - " +start;
  10. window.scroll(0,0);
  11. }
  12. function rem1(el){setTimeout(function(){el.parentElement.removeChild(el)},100);}
  13. function rem2(el){el.style.display="none";}
  14. function rem3(el){el.style.visibility="hidden";}
  15.  
  16. grid_preview(j);getImageList(--bucket);bucket;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement