Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rapidshare.js #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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