P3DM Fast Download

Decryption and redirects by decrypted link

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         P3DM Fast Download
// @description  Decryption and redirects by decrypted link
// @description:ru  Расшифровка и перенаправления по расшифрованой ссылке
// @namespace    Violentmonkey Scripts
// @icon         https://www.google.com/s2/favicons?sz=64&domain=p3dm.ru
// @version      1.0.2
// @author       Wizzergod
// @license MIT
// @match        https://p3dm.ru/download-en.html*
// @match        https://p3dm.ru/download-*.html*
// @match        https://p3dm.ru/download.html*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function decryptCode(code) {
        return atob(code);
    }

    function getDecryptedLink() {
        var url = window.location.href;
        var startIndex = url.indexOf('?') + 1;
        var code = url.substring(startIndex);
        var decryptedCode = decryptCode(code);
        var newLink = decryptedCode;
        return newLink;
    }

    function navigateToDecryptedLink() {
        var newLink = getDecryptedLink();
        if (newLink) {
            window.location.href = newLink;
        }
    }

    navigateToDecryptedLink();
})();