Pixeldrain No Limit DL on F95Zone.to

Integrates a raw Cybar URL into F95Zone threads

Per 18-07-2025. Zie de nieuwste versie.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey, Greasemonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Violentmonkey.

Voor het installeren van scripts heb je een extensie nodig, zoals Tampermonkey of Userscripts.

Voor het installeren van scripts heb je een extensie nodig, zoals {tampermonkey_link:Tampermonkey}.

Voor het installeren van scripts heb je een gebruikersscriptbeheerder nodig.

(Ik heb al een user script manager, laat me het downloaden!)

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een extensie nodig, zoals {stylus_link:Stylus}.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

Voor het installeren van gebruikersstijlen heb je een gebruikersstijlbeheerder nodig.

(Ik heb al een beheerder - laat me doorgaan met de installatie!)

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