Pixeldrain Multi-Bypass

Tüm download butonlarını yakalar, Sriflix ve EU.CC için norefferer uygular.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Pixeldrain Multi-Bypass
// @namespace    http://tampermonkey.net/
// @version      3.3
// @description  Tüm download butonlarını yakalar, Sriflix ve EU.CC için norefferer uygular.
// @author       geisselgottes
// @match        https://pixeldrain.com/u/*
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const getFileId = () => window.location.pathname.split('/').pop();

    // 1. İndirme Butonlarını Tespit Etme (Çok Esnek Seçici)
    const isAnyDownloadBtn = (el) => {
        if (!el || el.tagName !== 'BUTTON') return false;
        const text = el.innerText.toLowerCase();
        const hasIcon = el.querySelector('.icon')?.innerText === 'download';
        return text.includes('download') || hasIcon;
    };

    // 2. Merkezi Seçim Menüsü
    const createServerMenu = () => {
        const existingMenu = document.getElementById('pd-bypass-menu');
        if (existingMenu) { existingMenu.remove(); return; }

        const fileId = getFileId();
        const servers = [
            { name: " EU.CC Mirror", url: `https://cdn.pixeldrain.eu.cc/${fileId}` },
            { name: " Sriflix Mirror", url: `https://pixeldrain.sriflix.my/${fileId}` },
            { name: " Normal", url: `https://pixeldrain.com/api/file/${fileId}?download` }
        ];

        const menu = document.createElement('div');
        menu.id = 'pd-bypass-menu';
        menu.style = `
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 2147483647 !important; /* Maksimum Z-index */
            background: #1e272e;
            border: 3px solid #f39c12;
            border-radius: 12px;
            padding: 20px;
            box-shadow: 0 0 50px rgba(0,0,0,0.9);
            width: 300px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        `;

        const title = document.createElement('div');
        title.innerHTML = `<b style="color:#f39c12; font-size:16px;">Select Server</b><br>
                           <small style="color:#bdc3c7;">Referrer protection enabled</small>`;
        title.style.textAlign = 'center';
        menu.appendChild(title);

        servers.forEach(server => {
            const btn = document.createElement('a');
            btn.href = server.url;
            btn.target = "_blank";
            // Kısıtlamaları aşmak için referer'ı tamamen gizle
            btn.rel = "noreferrer noopener";
            btn.referrerPolicy = "no-referrer";
            btn.innerText = server.name;
            btn.style = `
                display: block;
                padding: 12px;
                background: #2f3542;
                color: white;
                text-decoration: none;
                text-align: center;
                border-radius: 6px;
                font-weight: bold;
                transition: 0.2s;
            `;
            btn.onmouseover = () => btn.style.background = "#f39c12";
            btn.onmouseout = () => btn.style.background = "#2f3542";

            btn.onclick = () => setTimeout(() => menu.remove(), 500);
            menu.appendChild(btn);
        });

        const closeBtn = document.createElement('button');
        closeBtn.innerText = "Cancel";
        closeBtn.style = "margin-top:5px; background:transparent; border:none; color:#7f8c8d; cursor:pointer;";
        closeBtn.onclick = () => menu.remove();
        menu.appendChild(closeBtn);

        document.body.appendChild(menu);
    };

    // 3. Global Tıklama Yakalayıcı
    window.addEventListener('click', function(e) {
        // En yakın butonu bul
        const target = e.target.closest('button');

        if (isAnyDownloadBtn(target)) {
            console.log("Download button detected, opening menu...");
            e.preventDefault();
            e.stopImmediatePropagation();
            createServerMenu();
        } else {
            const menu = document.getElementById('pd-bypass-menu');
            if (menu && !menu.contains(e.target)) menu.remove();
        }
    }, true);

    // 4. UI Otomatik Düzenleme
    const fixUI = () => {
        // Limit Paneli
        const blocks = document.querySelectorAll('.block');
        blocks.forEach(block => {
            if (block.innerText.toLowerCase().includes('limit') && !block.dataset.modded) {
                block.innerHTML = `
                    <div style="text-align:center; padding:15px; border:2px solid #f39c12; border-radius:8px; background:rgba(243, 156, 18, 0.05);">
                        <i class="icon" style="color:#f39c12; font-size:24px;">bolt</i>
                        <p style="color: #f39c12; font-weight: bold; margin: 5px 0;">Unlimited Limit Active</p>
                        <small style="color:#bdc3c7;">Use bypass servers to ignore transfer limits.</small>
                    </div>
                `;
                block.dataset.modded = "true";
            }
        });

        // Tüm butonları işaretle
        document.querySelectorAll('button').forEach(btn => {
            if (isAnyDownloadBtn(btn) && !btn.dataset.renamed) {
                btn.style.border = "2px solid #f39c12";
                btn.style.boxShadow = "0 0 10px rgba(243, 156, 18, 0.2)";
                // Eğer içinde span varsa ismini değiştir
                const span = btn.querySelector('span');
                if (span) span.innerText = "Download";
                btn.dataset.renamed = "true";
            }
        });
    };

    setInterval(fixUI, 1000);
})();