Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- document.body.insertAdjacentHTML("beforeend",'<div id="slide1" style="width:100%;height:100%;background-color:#222;background-repeat:no-repeat;background-position:center center;background-size:contain;"></div>');document.body.style.margin="0px";document.body.style.overflowY="hidden";var slide1=document.getElementById("slide1");window.scroll(0,slide1.offsetTop);
- var a=data1.innerHTML.match(/http.*?jpg/gim);
- setInterval(function(){slide1.style.backgroundImage="url('" + a[~~((a.length-1)*Math.random())]+ "')"},10000)
- setInterval(function() {
- var r=new XMLHttpRequest();
- r.open("GET","http://photos1.servepics.com/jabry/fsv.asp?q=t0&p="+ ((i++ % 50)+1));
- r.onreadystatechange=function(){if (this.readyState==4 && this.status==200) {
- var b=this.responseText.match(/http.*?jpg/gim);
- b.forEach(function(v){ if (a.indexOf(v)==-1) a.push(v)});
- console.log(i,a.length);
- } }
- r.send();
- },120000);
- /* maintenance stuff */
- a=a.map(function(v){var x=(v+"").match(/http:[^"]*?\.jpg/im); return x&&x[0]||null });a.forEach(function(v,i,a){if (v=="") a.splice(i,1); });a=a.unique();a.sort();
- post_imgur(a.map(function(v){return (v+"").replace("http://notebook1.lan/vc/","http://view.stern.de/de/original/")}))
- function () {
- var arr = this, newArr = [], obj = {};
- for(var i = 0, len = arr.length; i < len; i++){
- if (obj[arr[i]]) {
- continue;
- }
- obj[arr[i]] = 1;
- newArr.push(arr[i]);
- }
- return newArr;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement