Pixeldrain No Limit DL on F95Zone.to

Integrates a raw Cybar URL into F95Zone threads

2025-07-18 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

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