Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* listofcarbrands grid view (paging) */
- var ig="http://rg443.bugs3.com/p/?url=";
- var ig="http://rg443.hj.cx/p/?url=";
- document.head.insertAdjacentHTML("beforeEnd","<style> \
- img.b{width:160px;height:160px;margin:2px;background-color:whitesmoke;image-rendering:optimizeQuality;border-radius:7px;zoom:1.33} \
- img.s{width:90px;height:90px;margin:2px;background-color:whitesmoke;image-rendering:optimizeQuality;zoom:1.0} \
- img.t{width:320px;height:200px;margin:2px;image-rendering:optimizeQuality;border-radius:7px;} \
- </style>");
- document.head.insertAdjacentHTML('AfterBegin',
- '<link rel="shortcut icon" href="http://www.listofcarbrands.com/wp-content/themes/w-minfolio-1/favicon.ico" /> \
- <title>HD Car Wallpapers</title>');
- var cache1=cache1||{};
- var x={j:1,pageSize:20,page:670,title:"HD Car Wallpapers",title1:"listofcarbrands",url:"http://www.listofcarbrands.com/page/$i/"};
- /* init */
- document.body.innerHTML="<div id=\"navtop\" style=\"font:menu\"></div><div id=\"data1\" style=\"font:menu;min-height:12240px;overflow-y:visible;\"></div><div id=\"navbot\" style=\"font:menu\"></div>"
- x.data1=document.getElementById("data1");
- /*
- <img src="http://www.listofcarbrands.com/wp-content/themes/w-minfolio-1/timthumb.php?src=http://www.listofcarbrands.com/wp-content/uploads/2013/04/2013-Dodge-SRT-Viper-GTS-R-SRT-Viper-GTS.jpg&h=200&w=300&zc=1" alt="2013 Dodge SRT Viper GTS-R – SRT Viper GTS" width="300" height="200" />
- */
- x.next=function(){
- for (var i=x.j;i<x.j+x.pageSize;i++) setTimeout(get_url,(i-x.j-1)*200,ig+x.url.replace("$i",i),parse1);
- setTimeout(get_url,5000,ig+x.url.replace("$i",i)); // prefetch
- document.title=x.title1 +" - " + x.j;
- x.j+=x.pageSize;
- window.scroll(0,0);
- window.stop&&window.stop();
- x.data1.innerHTML="";
- function parse1(){
- var a = (this.match(/http:\/\/www.listofcarbrands.com\/wp-content\/uploads\/\S+.jpg/gim)||[]).map(function(v){return v.replace(/-\d+x\d+(?=\.jpg)/,"")});
- b=a.map(function(v,i){return '<img src="http://127.0.0.'+(i%10+1)+'/wp1/'+v.substring(7)+'?resize=320,200" class="t" alt=""/>'});
- x.data1.insertAdjacentHTML("beforeend",b.join(""));
- }
- }
- x.prev=function(){
- x.j-=x.pageSize*2; if(x.j<=1) x.j=1; x.next();
- }
- x.preview=function(e){
- var e=e.srcElement||e.target;
- if (e.tagName!="IMG") return;
- console.log(e.src);
- }
- document.onclick=x.preview;
- document.onkeyup=function(e){
- // console.log(e.which , e.keyCode,document.height,window.pageYOffset,window.innerHeight)
- if (e.keyCode==34 && (document.height-window.pageYOffset-window.innerHeight)==0)x.next(); /* pgdn */
- if (e.keyCode==33 && window.pageYOffset==0)x.prev(); /* pgup */
- }
- function get_url(url,callback) {
- if (cache1.hasOwnProperty(url) && callback) {callback.call(cache1[url]);return};
- var r=new XMLHttpRequest();
- r.open("GET",url,true);
- r.onreadystatechange=function(){
- if (this.readyState==4 && this.status==200) {cache1[url]=this.responseText; callback&&callback.call(this.responseText);};
- }
- r.send();
- }
- /* upload imgur */
- function post_imgur(a,callback) {
- var r=new XMLHttpRequest();
- r.open("POST","http://176.34.162.148/jabry/imgur1.asp?u=&b=",true);
- r.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) callback.call(this.responseText); }
- r.send("u=" + a.join(","));
- }
- x.next();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement