Renderosity Tools

Custom tools for Renderosity

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        Renderosity Tools
// @namespace   Violentmonkey Scripts
// @match       https://www.renderosity.com/*
// @icon        https://www.renderosity.com/favicon.ico
// @grant       none
// @version     1.2
// @description Custom tools for Renderosity
// @license     MIT
// ==/UserScript==

(function () {

    // ----------------------------------------------------
    // Helper: convert spaces → plus signs
    // ----------------------------------------------------
    function plusify(str) {
        return str.trim().split(" ").join("+");
    }

    // ----------------------------------------------------
    // Helper: extract product title from page
    // ----------------------------------------------------
    function getProductTitle() {
        const el = document.querySelector(".rr-mktproduct-title");
        if (!el) return null;
        return el.textContent.trim();
    }

    // ----------------------------------------------------
    // Only show floating buttons on product pages
    // ----------------------------------------------------
    if (location.href.startsWith("https://www.renderosity.com/marketplace/products/")) {

        // -----------------------------
        // Button 1: Search Render-State
        // -----------------------------
        const btn1 = document.createElement("button");
        btn1.textContent = "Search Render‑State";
        btn1.style.position = "fixed";
        btn1.style.top = "10px";
        btn1.style.right = "10px";
        btn1.style.zIndex = "999999";
        btn1.style.padding = "8px 12px";
        btn1.style.background = "#1e90ff";
        btn1.style.color = "#fff";
        btn1.style.border = "none";
        btn1.style.borderRadius = "6px";
        btn1.style.cursor = "pointer";
        btn1.style.fontSize = "14px";
        btn1.style.boxShadow = "0 2px 6px rgba(0,0,0,0.3)";
        btn1.style.opacity = "0.85";
        btn1.style.transition = "opacity 0.2s";

        btn1.onmouseenter = () => btn1.style.opacity = "1";
        btn1.onmouseleave = () => btn1.style.opacity = "0.85";

        btn1.onclick = () => {
            const title = getProductTitle();
            if (!title) return alert("Product title not found on page.");
            const query = plusify(title);
            const url = `https://render-state.to/?s=${query}&post_type=post`;
            window.open(url, "_blank");
        };

        document.body.appendChild(btn1);


        // -----------------------------
        // Button 2: Search 3D‑Load
        // -----------------------------
        const btn2 = document.createElement("button");
        btn2.textContent = "Search 3D‑Load";
        btn2.style.position = "fixed";
        btn2.style.top = "50px"; // below the first button
        btn2.style.right = "10px";
        btn2.style.zIndex = "999999";
        btn2.style.padding = "8px 12px";
        btn2.style.background = "#28a745";
        btn2.style.color = "#fff";
        btn2.style.border = "none";
        btn2.style.borderRadius = "6px";
        btn2.style.cursor = "pointer";
        btn2.style.fontSize = "14px";
        btn2.style.boxShadow = "0 2px 6px rgba(0,0,0,0.3)";
        btn2.style.opacity = "0.85";
        btn2.style.transition = "opacity 0.2s";

        btn2.onmouseenter = () => btn2.style.opacity = "1";
        btn2.onmouseleave = () => btn2.style.opacity = "0.85";

        btn2.onclick = () => {
            const title = getProductTitle();
            if (!title) return alert("Product title not found on page.");
            const query = plusify(title);
            const url = `https://3d-load.net/?s=${query}&asp_active=1&p_asid=1&p_asp_data=1&filters_initial=1&filters_changed=0&qtranslate_lang=0&asp_highlight=1&current_page_id=169737`;
            window.open(url, "_blank");
        };

        document.body.appendChild(btn2);
    }


    // ----------------------------------------------------
    // reCAPTCHA Removal (site-wide)
    // ----------------------------------------------------
    function removeCaptcha() {
        const candidates = document.querySelectorAll("div[style*='z-index: 2000000000']");
        for (const el of candidates) {
            if (el.querySelector("iframe[src*='recaptcha']")) {
                el.remove();
                console.log("reCAPTCHA block removed.");
            }
        }
    }

    removeCaptcha();

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

})();