Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* fetch url */
- 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();
- }
- Array.prototype.unique = function(){
- return this.filter(function(s, i, a){ return i == a.lastIndexOf(s); });
- }
- function save1(s){
- window[tag+"."+page]=s;//this.toString();
- console.log("rcvd:" + page);
- document.getElementById("data1").insertAdjacentHTML('beforeend',window[tag+"."+page].match(/<div id="data1">([\s\S]*?)<\/div>/im)[1]);
- location.hash=page;
- page++;
- if (page <=50) get_url("?q="+tag+"&p="+page,function(){save1(this.toString())});
- //
- }
- // get_url("?q="+tag+"&p="+page,function(){save1(this.toString())});
- tag="c87";page=2; get_url("?q="+tag+"&p="+page,function(){save1(this.toString())});
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement