Author

Topic: Bitcoin faucet rotator script help (Read 489 times)

member
Activity: 112
Merit: 10
November 04, 2015, 01:40:32 PM
#1
Hello.

I got the "WinCoins 1.0" faucet script but I would like to improve one function on it.

On the page of the faucet, I would like to put a href link to the current url.

This is the bitcoin.js file that are the urls:

Code:
var s=[
"faucet1.html",
"faucet2.html",
"faucet3.html",
];
var adr,i,x=0,c=s.length;
function address() {
adr=prompt('Enter your bitcoin address:');
s=s.map(function(x){
  return x.indexOf("a=") != -1 ? x + adr : x;
});
}
function next(){
x+=1;
if (x>c-1)
  {
  x=0;
  }
changeSrc();
}
function prev(){
x-=1;
if (x<=0)
  {
  x=c-1;
  }
changeSrc();
}
function jumpTo() {
i=prompt("Enter a number to skip to that faucet.");
x=0;
while (i!=x) {
  if (x>c-2) {
  break;
  }
  x+=1;
}
changeSrc();
}
function newTab() {
var win=window.open(document.getElementById("fm").src, '_blank');
win.focus();
}
function changeSrc() {
document.getElementById("fm").src=s[x];
}

Where "fm" is the id of the iframe on the bitcoin.php page:

Code:

   


I tryed to place this code on bitcoin.php:

Code:

But it return me the bitcoin.php link, not the url that the iframe is showing.

Can anyone help me with that?


Thanks
Jump to: