Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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