Pixeldrain Multi-Bypass

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

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