Scribd Auto Downloader by 3xploiton3

Otomatis input URL dokumen Scribd ke vDownloader dan unduh file PDF secara otomatis dalam 1 klik dari scribd.com

Verze ze dne 14. 08. 2025. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Scribd Auto Downloader by 3xploiton3
// @namespace    https://greasyfork.org/users/3xploiton3
// @version      1.1
// @description  Otomatis input URL dokumen Scribd ke vDownloader dan unduh file PDF secara otomatis dalam 1 klik dari scribd.com
// @author       3xploiton3
// @match        https://*.scribd.com/document/*
// @match        https://*.scribd.com/doc/*
// @match        https://scribd.vdownloaders.com/*
// @icon         https://scribd.vdownloaders.com/favicon.ico
// @license      MIT
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function () {
    'use strict';

    const host = location.hostname;
    const path = location.pathname;

    // ====================================
    // 1. Tambahkan tombol di halaman Scribd
    // ====================================
    if (host.includes('scribd.com') && (path.includes('/document/') || path.includes('/doc/'))) {
        const currentURL = window.location.href;
        const vDownloadURL = `https://scribd.vdownloaders.com/?doc=${encodeURIComponent(currentURL)}`;

        const button = document.createElement('button');
        button.innerText = '⬇ Download via vDownloader';
        button.style.position = 'fixed';
        button.style.top = '80px';
        button.style.right = '20px';
        button.style.zIndex = '9999';
        button.style.padding = '10px 15px';
        button.style.backgroundColor = '#1a73e8';
        button.style.color = '#fff';
        button.style.border = 'none';
        button.style.borderRadius = '4px';
        button.style.cursor = 'pointer';
        button.style.fontSize = '14px';
        button.style.boxShadow = '0 2px 5px rgba(0,0,0,0.3)';

        button.onclick = () => {
            window.open(vDownloadURL, '_blank');
        };

        document.body.appendChild(button);
    }

    // ===================================================
    // 2. Auto-paste + auto-click "Get Download Now" button
    // ===================================================
    if (host === 'scribd.vdownloaders.com' && path === '/') {
        const params = new URLSearchParams(window.location.search);
        const docURL = params.get('doc');

        if (!docURL) return;

        const fillAndClick = () => {
            const input = document.querySelector('input[name="url"], #url');
            const button = document.querySelector('form button[type="submit"]');

            if (input && button) {
                input.value = docURL;

                // Simulate user input
                input.dispatchEvent(new Event('input', { bubbles: true }));
                input.dispatchEvent(new Event('change', { bubbles: true }));

                // Klik tombol setelah delay singkat
                setTimeout(() => {
                    button.click();
                    console.log("✅ Tombol 'Get Download Now' berhasil diklik.");
                }, 500);
            } else {
                // Retry sampai form tersedia
                setTimeout(fillAndClick, 500);
            }
        };

        fillAndClick();
    }

    // ================================
    // 3. Auto download setelah 11 detik
    // ================================
    if (host === 'scribd.vdownloaders.com' && path.startsWith('/vdoc')) {
        setTimeout(() => {
            const downloadBtn = document.querySelector('a.btn[href*="pdf"], a[href*="download"]');
            if (downloadBtn) {
                downloadBtn.click();
                console.log("✅ Tombol download PDF diklik otomatis.");
            } else {
                console.warn("⚠️ Tombol download PDF tidak ditemukan!");
            }
        }, 11000);
    }

})();