Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions rapidshare/rapidshare.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@ rsDownloadHelper.onLoad = function()
downloadcounter.style.display='none';

var ina = setInterval(function() {
var zeit = document.getElementById("zeit");
var num = zeit.innerHTML.match(/[\d\.]+/g);
downloadcounter.style.display='none';
var zeit = document.getElementById("zeit"); // selecting the element with Id zeit.
var num = zeit.innerHTML.match(/[\d\.]+/g); // trying to match its inner html to text '/[\d\.]+/g'
downloadcounter.style.display='none'; // set the display property of the DIV element to "none"
message.innerHTML = "Now you can continue browsing, the file will be downloaded automatically!<br>Your automatic download will start in <font style='font-size:12px;color:#df3f4e'><b>"+ num[0] +"</b></font> seconds.";

if (num[0] == "1") {
var inaa = setTimeout(function() {
var f = document.forms;
for (i=0;i<f.length;i++) {
if (f[i].name=="dlf") {
// change message HTML content
if (num[0] == "1") { // if num is 1 then execute the if
var inaa = setTimeout(function() { // wait for 1.5s to execute the function
var f = document.forms; // f is equal to forms present in documents
for (i=0;i<f.length;i++) {
if (f[i].name=="dlf") { // if we find dlg in name in f then submit it.
f[i].submit();
return;
}
}
}, 1500);
clearInterval(ina)
}
},1000);
},1000);
}

}
Expand Down