Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tag="",pageSize=20,tag1=""; /* category/editors-choice/ popular-photos top-photos editors-choice top-sharing the-favourite-of-the-day portfolios */
- for (var i=1,t=new Date();i<=pageSize;i++) setTimeout(get_url,i*250,"http://users1.jabry.com/rg443/text.asp?url=http://artfreelance.me/"+tag1+"page/"+i+"/",parse1);
- 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="1260px"; data1.style.minHeight="30000";data1.style.overflowY="visible";
- 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);}
- function parse1(){
- var a=this.substring(this.indexOf('<div id="content"')+1).match(/http:\/\/artfreelancedotorg.files.wordpress.com\/\S+\.jpg/gim),b=unique1(a).map(function(v){return '<img src="'+v+'?w=248&h=330&crop=1" style="width:248px;height:330px;margin:2px;"/>'});data1.insertAdjacentHTML("beforeEnd",b.join(""));
- }
- data1.onclick=function(e){
- var e=e.srcElement||e.target;
- if (e.tagName!="IMG") return;
- // var tag=e.src.match(/(\d+)\/(\w{40})/);
- // console.log(tag[1],tag[2])
- var w=window.open("about:blank");w.location=e.src.match(/http\S+.jpg/)
- }
- var j=pageSize;
- next1.onclick=function(){
- window.scroll(0,0); // data1.offsetTop
- data1.innerHTML="";
- for (var i=j,t=new Date();i<j+pageSize;i++) setTimeout(get_url,(i-j)*200,"http://users1.jabry.com/rg443/text.asp?url=http://artfreelance.me/page/"+i+"/",parse1);
- document.title="artfreelance - " +j;
- j+=pageSize;
- }
- document.onkeyup=function(e){
- //console.log(e.which , e.keyCode,document.height,window.pageYOffset,window.innerHeight)
- // eof && pgdn
- if (e.keyCode==34 && (document.height-window.pageYOffset-window.innerHeight)==0){next1.onclick();console.log("more");}
- }
- /*
- document.onmousewheel=function(e){
- //console.log(e.wheelDelta);
- if (e.wheelDelta<0 && (document.height-window.pageYOffset-window.innerHeight)==0){next1.onclick();console.log("more");}
- }
- */
- console.log()
- 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();
- }
- function unique1(a){for(var c=Object.create(null),d=[],b=a.length;b--;)c[a[b]]||(c[a[b]]=!0,d.push(a[b]));return d};
- /* <div id="content" class="portfolios" style="display:none"> */
Add Comment
Please, Sign In to add comment