Scribd Auto Downloader by 3xploiton3

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

Stan na 08-08-2025. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);
    }

})();