Scribd Auto Downloader by 3xploiton3

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

Versione datata 08/08/2025. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Scribd Auto Downloader by 3xploiton3
// @namespace    https://greasyfork.org/users/3xploiton3
// @version      1.0
// @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.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/')) {
        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);
    }

})();