Skip to content

Instantly share code, notes, and snippets.

@tzi
Created February 15, 2012 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tzi/1838395 to your computer and use it in GitHub Desktop.
Save tzi/1838395 to your computer and use it in GitHub Desktop.
A #javascript #bookmarklet : Automatically launch download on #RapidShare
(function() {
// Instanciate a generic bookmarklet popin
var popin = new bm_popin( 1838395 );
popin.title( 'Quick RapidShare' );
// Inspect if timer is finish
var interval_id;
var inspect_rapidshare_timer = function() {
var rapidshare_timer = document.querySelector('#js_dlpage_freetimer_container');
if ( rapidshare_timer ) {
var is_waiting = rapidshare_timer.style.display != 'none';
if ( is_waiting ) {
popin.text( 'Waiting ' + rapidshare_timer.innerHTML );
} else {
popin.add_text( 'Let\'s go !!!' );
document.querySelector('#js_dlpage_dlbtn').click();
clearInterval( interval_id );
}
} else {
popin.text( 'No download timer found.' );
clearInterval( interval_id );
}
}
interval_id = setInterval( inspect_rapidshare_timer, 1000);
}) ();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment