MjKey / FreeTP Fast Download

// ==UserScript==
// @name                FreeTP Fast Download
// @name:ru-RU          Быстрое скачивание с FreeTP.org
// @name:ru             Быстрое скачивание с FreeTP.org
// @namespace           https://mjkey.ru/#work
// @version             0.1
// @description         Downloading without waiting and removes fake links
// @description:ru      Скачивание без ожидания и удаляет фейк ссылки!
// @description:ru-RU   Скачивание без ожидания и удаляет фейк ссылки!
// @author              MjKey <goe@mjkey.ru>
// @twitterURL          https://twitter.com/mjkey_life
// @supportURL          https://openuserjs.org/scripts/MjKey/FreeTP_Fast_Download/issues
// @contributionURL     https://www.donationalerts.com/r/mjk3y
// @icon                data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAACHNJREFUWIXFl2uMVsUdxn8zZ87lvez13V1YQHbXhRUQUCtekChiCCLeWhtTLVpsLaQtNJa0iZLWGowxbdX4oakXvKS0jbWtTWqFWmsLokCRywKWgtx3dZdddtl3efe9n8tMP1ASqiwCfujzbeYkz/M7//nPzDnwf5YAuP+fD0wcKnlzg1CMcIzvlAKvLsCtiqsgSNplmXBKyVm1O6r3+02eK31pybDYoAYHyjhHfWN1gtkZRMm3lkz+Q+7cAQxi4eOPHZq8NtGsQggVRLYhcMF3DEUX8jHIJQzH6jXZCwuMqctw46id2ErTF1ZhiwAD5XQYX9MbJH9Tc1nTq8vFcn3WFVj2xA+fzhypWiyOOXZFVlOd1dRkDXVD0NJnUX/cQmkBGIoe7BsXsWtiyN5b0tRN6qfSK+BIGO91MsHrNKsy097LFOJfXj7tt8fOCgBg7l8eGWNHpUfDyJqfzsWdcs4Q5SLsMGJ0r+H292LM3pnEDQUlK6RsRQSO4K/zyhy6v4sxozJUKMUouxPfCLRhX4g/7762jQfPCgDAfETsex2Lph4sND1sCzMvV0bk8wKZjzDpEvUHIpa+nqK53yHrlCmpCKUFeydK/vz9bsZNPk617VIjDxOTPgYORY6eNr9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cncfS/PfOnDs/E8pwqc1My1j6iaff6Pncr4MjvpWJZd2ByvGXy2WMj8buWslaXz8TwvfWP9Q9MXbV085fN4/AeC7NMwPU2zeAAAAABJRU5ErkJggg==
// @match               *://www.freetp.org/*
// @match               *://*.freetp.org/*
// @match               *://*.freetp.org/*.html
// @match               *://*.freetp.org/*.html?*
// @match               *://*.freetp.org/*.htm
// @match               *://*.freetp.org/*.htm?*
// @match               *://*.freetp.org/*/*
// @match               *://*.freetp.org/*/*.html
// @match               *://*.freetp.org/*/*.html?*
// @match               *://*.freetp.org/*/*.htm
// @match               *://*.freetp.org/*/*.htm?*
// @require             https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
// @grant               window.close
// @license             GPL-3.0-or-later
// @updateURL           https://openuserjs.org/meta/MjKey/FreeTP_Fast_Download.meta.js
// @downloadURL         https://openuserjs.org/install/MjKey/FreeTP_Fast_Download.user.js
// ==/UserScript==

(function() {
    'use strict';
    //v2 (RECOMENDATED)
    var a = location.href; //link
    var b; //код файла
    if(a.match('/getfile')){
        $('body').hide();
        b = a.replace(/[^+\d]/g, ''); //получем код из ссылки
        console.log(a+'+'+b);
        window.open('https://freetp.org/engine/download.php?id='+b); //ссылка на скачивание собственно
        $('html').append('<center><h1>Быстрое скачивание by MjKey</h1><br><a href="https://mjkey.ru/" target="_blank"><h2>mjkey.ru</h2></a><p>Если на скачалось, то клик <a href="https://freetp.org/engine/download.php?id='+b+'"><b>СЮДА</b></a></p></center>'); //реклама
        setTimeout(function(){
            window.close(); //закрытие вкладки через 5сек
        }, 5000);
    }
    // убирает лишние кнопки скачать (рекламу)
    $("img[src$='1appwzrd.png']").hide();
    $("a[href*='is.gd']").hide();
    $("table").hide();
    //v1
    /*
    var a;
    var b;
    var d;
    window.onload = function() {
        a = $('.quote p a, .quote span a').attr('href');
        if(a.match('/getfile')){
            d = 0;
            b = a.replace(/[^+\d]/g, '');
        }else{
            d = 1;
            d = atob(a.split('=').pop());
            b = d.replace(/[^+\d]/g, '');
        }
        $('.quote p a, .quote span a').attr('href','//freetp.org/engine/download.php?id='+b);
    };*/
})();