Fakirdebrid VIP Auto Helper

Automatically downloads files from compatible file hosts through Fakirdebrid using your VIP account

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/392268/1175916/Fakirdebrid%20VIP%20Auto%20Helper.js

// ==UserScript==
// @name         Fakirdebrid VIP Auto Helper
// @namespace    https://greasyfork.org/en/users/10118-drhouse
// @version      2.6
// @description  Automatically downloads files from compatible file hosts through Fakirdebrid using your VIP account
// @author       drhouse
// @include      https://www.goloady.com/*
// @include      http*://*.filespace.tld/*
// @include      http*://www.wdupload.com/*
// @include      http*://www.file-up.org/*
// @include      http*://upstore.net/*
// @include      http*://Uploaded.net/*
// @include      http*://Keep2Share.cc/*
// @include      http*://k2s.cc/*
// @include      http*://FileBoom.me/*
// @include      http*://Filespace.com/*
// @include      http*://DepositFiles/*
// @include      http*://Ubiqfile.com/*
// @include      http*://Rapidgator.net/*
// @include      http*://File.AL/*
// @include      http*://Filenext.com/*
// @include      http*://Gigapeta.com/*
// @include      http*://Nitroflare.com/*
// @include      http*://Takefile.link/*
// @include      http*://Goloady.com/*
// @include      http*://Uptobox.com/*
// @include      http*://Filefactory.com/*
// @include      http*://Fshare.vn/*
// @include      http*://Filesmonster.com/*
// @include      http*://Prefiles.com/*
// @include      http*://Mexashare.com/*
// @include      http*://Turbobit.net/*
// @include      http*://DDL.to/*
// @include      http*://Katfile.com/*
// @include      http*://Filemass.net/*
// @include      http*://Xubster.com/*
// @include      http*://1fichier.com/*
// @include      http*://Minfil.com/*
// @include      http*://Daofile.com/*
// @include      http*://Load.to/*
// @include      http*://DL.Free.fr/*
// @include      http*://Wupfile.com/*
// @include      http*://Anonfile.com/*
// @include      http*://Extmatrix.com/*
// @include      http*://Anzfile.net/*
// @include      http*://Nelion.me/*
// @include      http*://Myfiles.pro/*
// @include      http*://Datafilehost.com/*
// @include      http*://Alfafile.net/*
// @include      http*://Isra.cloud/*
// @include      http*://Filer.net/*
// @include      http*://Flashbit.cc/*
// @include      http*://Myfile.is/*
// @include      http*://Openload.cc/*
// @include      http*://Dropfile.nl/*
// @include      http*://Uppit.com/*
// @include      http*://Megaupload.is/*
// @include      http*://Hitfile.net/*
// @include      http*://Novafile.com/*
// @include      http*://Filefox.cc/*
// @include      http*://Upfile.mobi/*
// @include      http*://Uploadrar.com/*
// @include      http*://Solidfiles.com/*
// @include      http*://Tezfiles.com/*
// @include      http*://Wushare.com/*
// @include      http*://Uploadboy.com/*
// @include      http*://Userscloud.com/*
// @include      http*://Letsupload.cc/*
// @include      http*://File-up.org/*
// @include      http*://Oboom.com/*
// @include      http*://Tusfiles.com/*
// @include      http*://Easybytez.com/*
// @include      http*://Uploadcloud.pro/*
// @include      http*://Upload.ac/*
// @include      http*://Megaup.net/*
// @include      http*://Zippyshare.com/*
// @include      http*://Ulozto.net/*
// @include      http*://Letsupload.co/*
// @include      http*://Dropapk.com/*
// @include      http*://Fileup.cc/*
// @include      http*://Bayfiles.com/*
// @include      http*://Bangbros.com/*
// @include      http*://Usersdrive.com/*
// @include      http*://Julesjordan.com/*
// @include      http*://Kink.com/*
// @include      http*://Unibytes.com/*
// @include      http*://4downfiles.org/*
// @include      http*://Mediafire.com/*
// @include      http*://Rapidu.net/*
// @include      http*://Uploadocean.com/*
// @include      http*://Sendspace.com/*
// @include      http*://Ddfnetwork.com/*
// @include      http*://Wayupload.com/*
// @include      http*://Uploadev.org/*
// @include      http*://Uptostream.com/*
// @include      http*://Vidoza.net/*
// @include      http*://Filestore.to/*
// @include      http*://Oload.win/*
// @include      http*://Verystream.com/*
// @include      http*://Cornfile.com/*
// @include      http*://Thefileslocker.com/*
// @include      http*://Upload4earn.org/*
// @include      http*://Desufiles.com/*
// @include      http*://Fuskbugg.se/*
// @include      http*://Clicknupload.org/*
// @include      http*://Share-online.biz/*
// @include      http*://Spicyfile.com/*
// @include      http*://Brupload.net/*
// @include      http*://4shared.com/*
// @include      http*://Upload.st/*
// @include      http*://Anonfiles.com/*
// @include      http*://Rapidvideo.com/*
// @include      http*://Dl4free.com/*
// @include      http*://Dailymotion.com/*
// @include      http*://Uploadhaven.com/*
// @include      http*://Megadl.fr/*
// @include      http*://Redfile.eu/*
// @include      http*://Filescdn.net/*
// @include      http*://Upfile.co.il/*
// @include      http*://Backin.net/*
// @include      http*://Filetitle.com/*
// @include      http*://Dix3.com/*
// @include      http*://Ayefiles.com/*
// @include      http*://File.bz/*
// @include      http*://Mp4upload.com/*
// @include      http*://Thevideo.me/*
// @include      http*://Mshare.io/*
// @include      http*://Es.slideshare.net/*
// @include      http*://Upload.ee/*
// @include      http*://Streamango.com/*
// @include      http*://Workupload.com/*
// @include      http*://Uptomega.com/*
// @include      http*://Streamcloud.eu/*
// @include      http*://Yunfile.com/*
// @include      http*://Modsbase.com/*
// @include      http*://Cutedrive.com/*
// @include      http*://Big4shared.com/*
// @include      http*://Datafile.com/*
// @include      http*://Indishare.me/*
// @include      http*://Slideshare.net/*
// @include      http*://Dosya.tc/*
// @include      http*://Srfiles.com/*
// @include      http*://fakirdebrid.net/generate/
// @include      http*://server1.fakirdebrid.info/*
// @include      http*://server2.fakirdebrid.info/*
// @include      http*://server3.fakirdebrid.info/*
// @include      http*://server1.turkleech.com/*
// @include      http*://server2.turkleech.com/*
// @include      http*://server3.turkleech.com/*
// @include      https://server1.turkleech.com/disk1/RapidLeechNew/index.php
// @include      https://server1.turkleech.com/disk2/RapidLeechNew/index.php
// @include      https://server1.turkleech.com/disk3/RapidLeechNew/index.php
// @exclude      https://server1.turkleech.com/TransLoad/filelist.php?dir=*
// @exclude      https://server2.turkleech.com/TransLoad/filelist.php?dir=*
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_deleteValue
// @grant        GM_notification
// @grant        window.close
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @require      https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js
// @require      https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js
// @license      CC-BY-NC-SA-4.0
// @icon         https://b.piclect.com/r190310_68be9.png
// @locale       en
// ==/UserScript==

$(document).ready(function () {


    if (window.location.href.indexOf('fakirdebrid') === -1 && window.location.href.indexOf('turkleech') === -1){
        var here = top.location.href;
        var title = document.title;
        GM_deleteValue("filespace");
        GM_deleteValue("filespacetitle");
        GM_setValue("filespace", here);
        GM_setValue("filespacetitle", title);
        window.location.href = 'https://fakirdebrid.net/generate/';
    }

    if (location == "https://fakirdebrid.net/generate/"){
        var x = document.referrer;

        if (x){
            var target1 = '#links';
            var target2 = '#submit';
            var storedObject = GM_getValue("filespace");
            var storedObjectTitle = GM_getValue("filespacetitle");
            var msg = new SpeechSynthesisUtterance('Now preparing ' + storedObjectTitle);
            window.speechSynthesis.speak(msg);
            $(target1).val(storedObject);
            //             GM_notification(storedObjectTitle, "Generating Link");
            $(target2).click();

            setInterval(function(){
                var n = $('#link0 > p > font:nth-child(3) > b > a').attr('href');
                if (n){
                    window.location.href = n;
                }
            }, 5000);
        }
        else{
            console.log('regular mode');
        }
    }

    //     function toBeRunOnce(){

    //             toBeRunOnce = function() {};
    //         }

    if (window.location.href.indexOf('server1.fakirdebrid.info') > -1 || window.location.href.indexOf('server2.fakirdebrid.info') > -1 || window.location.href.indexOf('server3.fakirdebrid.info') > -1 || window.location.href.indexOf('server1.turkleech.com') > -1 || window.location.href.indexOf('server2.turkleech.com') > -1 || window.location.href.indexOf('server3.turkleech.com') > -1){
        $('#tb1 > tbody > tr > td:nth-child(2) > button').click(); //dark mode
        var c = $('a.TransloadFile').attr('href')
        var cc = $('#file_finish > b:nth-child(4) > a').attr('href')
        msg = new SpeechSynthesisUtterance('Starting TransLoad Server Transfer');
        window.speechSynthesis.speak(msg);

        if (c){
            var refreshId1 = setInterval(function(){
                window.location.href =  c;
                clearInterval(refreshId1);
            }, 3000);
        }

             if (cc){
            var refreshId2 = setInterval(function(){
                window.location.href =  cc;
                clearInterval(refreshId2);
            }, 3000);
        }


            //                         GM_notification('Starting TransLoad Server Transfer', "Processing...");
            // toBeRunOnce()

        //        // https://server1.turkleech.com/disk3/RapidLeechNew/index.php

        var refreshId = setInterval(function(){
            var n = $('body > div > span > font > b > a').attr('href');

            //             var m = $('body > div > div > span > b > font > a').attr('href');
            var m = $("body > div:nth-child(5) > div > span > b > font > a").attr('href');
            var o = $("#file_finish > b:nth-child(4) > a").attr('href');

            if (n){
                //                 GM_notification('Starting Local Transfer', "Processing...");
                msg = new SpeechSynthesisUtterance('Starting Local Transfer');
                window.speechSynthesis.speak(msg);


                window.location.href = n;
                clearInterval(refreshId);

                setTimeout(function(){
                    window.close();
                }, 3000);
            }
            if (m){
                //                 GM_notification('Starting Local Transfer', "Processing...");
                msg = new SpeechSynthesisUtterance('Starting Local Transfer');
                window.speechSynthesis.speak(msg);


                window.location.href = m;
                clearInterval(refreshId);

                setTimeout(function(){
                    window.close();
                }, 3000);
            }
            if (o){
                //                 GM_notification('Starting Local Transfer', "Processing...");
                msg = new SpeechSynthesisUtterance('Starting Local Transfer');
                window.speechSynthesis.speak(msg);


                window.location.href = o;
                clearInterval(refreshId);

                setTimeout(function(){
                    window.close();
                }, 3000);
            }
        }, 5000);
    }

    if (window.location.href.indexOf('https://server1.turkleech.com/disk1/TransLoad/filelist.php?dir') > -1 || window.location.href.indexOf('https://server1.turkleech.com/disk2/TransLoad/filelist.php?dir') > -1 || window.location.href.indexOf('https://server1.turkleech.com/disk3/TransLoad/filelist.php?dir') > -1 || window.location.href.indexOf('https://server2.turkleech.com/disk1/TransLoad/filelist.php?dir') > -1 || window.location.href.indexOf('https://server2.turkleech.com/disk2/TransLoad/filelist.php?dir') > -1 || window.location.href.indexOf('https://server2.turkleech.com/disk3/TransLoad/filelist.php?dir') > -1){
        GM_notification('Starting Local Download', "Finalizing...");
        msg = new SpeechSynthesisUtterance('Starting Local Download');
        window.speechSynthesis.speak(msg);


        var d = $('body > center:nth-child(3) > a').attr('href');

        if (d){
            window.location.href =  d;
        }
    }


});