Renderosity Tools

Custom tools for Renderosity

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

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

})();