Rapidshare Premium TweakPack (nvp)

By NVP Last update Aug 10, 2008 — Installed 1,593 times. Daily Installs: 0, 1, 1, 0, 1, 3, 0, 0, 1, 0, 0, 3, 1, 3, 0, 1, 0, 3, 0, 0, 1, 0, 1, 1, 2, 1, 0, 0, 4, 0, 3, 2

There are 2 previous versions of this script.

// ==UserScript==
// @name           Rapidshare TweakPack (nvp)
// @namespace      rapidshare
// @description    Rapidshare Premium Tweak
// @include        https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi*
// ==/UserScript==

// Add jQuery
var GM_JQ = document.createElement('script');
GM_JQ.src = 'http://jquery.com/src/jquery-latest.js';
GM_JQ.type = 'text/javascript';
document.getElementsByTagName('head')[0].appendChild(GM_JQ);

// Check if jQuery's loaded
function GM_wait(){
    if (typeof unsafeWindow.jQuery == 'undefined') {
        window.setTimeout(GM_wait, 100);
    }
    else {
        $ = unsafeWindow.jQuery;
        main();
    }
}

GM_wait();

// All your GM code must be inside this function
function main(){

    $('h1').text( $('h1').text() + '[TWEAKED]').attr("style","color: teal;");
    
    /************* MAIN PAGE ***************/
    if (document.location.href == 'https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi') {
		$("center").attr("style","text-align:left; margin-left: 250px;");
        $("<div id='dl_list' style='position: fixed; width: 240px; font-size:10px; overflow: auto; top: 0px; height: 100%; left: 0px; background-color: #000000; color: #ffffff; border-right: 5px solid #ccc;'></div>").appendTo("body").fadeTo(0, 0.7);
        $('div.fliste td a:nth-child(1)').each(function(){
            $("#dl_list").append($(this).attr("href") + "<br/>");
        });
    }
    
    /************* MAIN PAGE:END ***************/
    
    
    /************* REMOTE UPLOAD PAGE ***************/
    if (document.location.href != 'https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi?remotegets=1') 
        return; // Not remote upload page, do not continue
    // Mass delete
    $("input[@type='button']").parent('div').prepend($("<button id='tw_massdel'>Delete All</button>"));
    $('button#tw_massdel').click(function(){
        if (confirm("Are you sure you want to delete all the jobs?")) {
            $("button").attr("disabled", "disabled");
            
            $(".dtabelle a").each(function(i, a){
                var self = $(this);
                var id = $(this).attr('href').split("'")[1];
                var param = "remotegets=1&killjobs=1&killjob-" + id + "=1";
                $.ajax({
                    type: "POST",
                    data: param,
                    success: function(html){ // Let's parse the response!
                        self.parents('tr').empty();
                    }
                });
                
            });
        }
    });
    
    // Mass add
    $('div.klappbox p').eq(0).html('Multiple Uploads Supported. Just enter multiple urls inside the box =)</i>');
    $("input[@type='submit']").val("Add multiple files");
    
    $('div.klappbox form').submit(function(){
        $("input[@type='submit']").val("Submitting... Please wait...").attr("disabled", "disabled");
        var txt = $('textarea').val().split('\n');
        for (i in txt) {
            if (txt[i].length > 3) {
                var param = "remotegets=1&urls=" + txt[i];
                $("input[@type='submit']").val("[LOADING] Submitting " + txt[i] + "...");
                $.ajax({
                    async: false,
                    type: "POST",
                    data: param,
                    success: function(html){ // Let's parse the response!
                    }
                });
                $("input[@type='submit']").val("All done. refreshing page...");
            }
        }
        location.reload(true);
        return false;
    });
    /************* REMOTE UPLOAD PAGE:END ***************/

}