Pixeldrain No Limit DL on F95Zone.to

Integrates a raw Cybar URL into F95Zone threads

Stan na 18-07-2025. Zobacz najnowsza wersja.

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

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

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         Pixeldrain No Limit DL on F95Zone.to
// @namespace    https://greasyfork.org/fr/users/1468290-payamarre
// @version      1.1
// @icon         https://www.google.com/s2/favicons?sz=64&domain=f95zone.to
// @description  Integrates a raw Cybar URL into F95Zone threads
// @author       NoOne
// @license MIT
// @match        https://f95zone.to/*
// @grant        GM_xmlhttpRequest
// @connect      f95zone.to
// ==/UserScript==

/* >> This script works better when used alongside:
 * >> F95Zone-Skipper → https://github.com/Cat-Ling/f95zone-skipper
 * >> Pixeldrain-Bypass-Userscript → https://github.com/MegaLime0/pixeldrain-bypass-usercript
 * >> No links showing? Click the Pixeldrain link, complete the CAPTCHA, then refresh the page.
 */

(function () {
    'use strict';

    const CYBAR_BASE = "https://pd.cybar.xyz/";

    if (window.location.hostname === 'f95zone.to' && !window.location.pathname.startsWith('/masked/')) {
        const addCybarLinks = () => {
            const links = document.querySelectorAll('a[href*="/masked/pixeldrain.com/"]');

            links.forEach(link => {
                if (link.dataset.cybarDone) return;
                link.dataset.cybarDone = "true";

                GM_xmlhttpRequest({
                    method: "POST",
                    url: link.href,
                    headers: {
                        "Content-Type": "application/x-www-form-urlencoded"
                    },
                    data: "xhr=1&download=1",
                    onload: function (res) {
                        try {
                            const json = JSON.parse(res.responseText);
                            if (json.status === "ok" && json.msg.includes("pixeldrain.com/u/")) {
                                const match = json.msg.match(/pixeldrain\.com\/u\/([\w\d]+)/);
                                if (match && match[1]) {
                                    const cybarUrl = CYBAR_BASE + match[1];

                                    const rawLink = document.createElement('a');
                                    rawLink.href = cybarUrl;
                                    rawLink.textContent = ` [${match[1]}]`;
                                    rawLink.style.color = "#a4be8c";
                                    rawLink.style.marginLeft = "5px";
                                    rawLink.target = "_blank";

                                    link.insertAdjacentElement('afterend', rawLink);
                                }
                            }
                        } catch (e) {
                            console.error("Erreur parsing JSON pour :", link.href, e);
                        }
                    },
                    onerror: function () {
                        console.error("Erreur HTTP pour :", link.href);
                    }
                });
            });
        };

        addCybarLinks();
        const observer = new MutationObserver(addCybarLinks);
        observer.observe(document.body, { childList: true, subtree: true });
    }
})();