Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var j= j||31539835;
- function grid_preview(start){
- if (!start) start=31407443;
- for (var a=[],i=start;i>start-450;i--) {a.push('<img src="http://i'+ i%3 + '.wp.com/img.fotocommunity.com/photos/'+i+'.jpg?resize=320,200" style="width:320px;height:200px" onerror="rem3(this)" />'); if (i==1) break;}
- // cdn.fotocommunity.com/qthumb/
- window.stop();
- document.body.innerHTML=a.join("");
- 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>');
- 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>');
- document.body.insertAdjacentHTML("beforeEnd",'<a href="#" onclick="latest();setTimeout(window.scroll,500,0,0);return false;" style="font:menu;font-size:9pt;color:black;text-decoration:none;margin-left:5px;" title="latest"> latest </a>');
- document.title="fc - " +start;
- /*
- http://cdn.fotocommunity.com/photos/30881781.jpg 1000,
- http://cdn.fotocommunity.com/qthumb/30881781.jpg 240,240
- http://cdn.fotocommunity.com/thumbs/30881781.jpg 120,80
- */
- }
- function latest(callback){
- var r=new XMLHttpRequest();
- r.open("GET","http://query.yahooapis.com/v1/public/yql?q=select * from html where url = 'http://www.fotocommunity.de/fotos-neu-international'",true);
- r.onload=function(){
- var re=/display\/(\d+)/gim,m=null,latest=-1;
- while(m=re.exec(this.responseText)) (latest<m[1])&&(latest=parseInt(m[1]))
- console.log(latest);
- latest&&(localStorage["fc.latest"]=[Math.floor(new Date().getTime()/1000),latest]);
- latest&&callback&&callback.call(latest);
- latest&&grid_preview(latest);
- latest&&(j=latest);
- }
- r.send();
- }
- function rem1(el){setTimeout(function(){el.parentElement.removeChild(el)},100);}
- function rem2(el){el.style.display="none";}
- function rem3(el){el.style.visibility="hidden";}
- grid_preview(j);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement