De-Junk my Chub Trunk

Bypassess login requirement, removes paid feature buttons, removes blur from NSFW images, fixes CSS, and more...

目前為 2024-05-11 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name        De-Junk my Chub Trunk
// @namespace   https://www.chub.ai
// @match       https://*.chub.ai/*
// @version     1.0
// @author      LoafyLemon
// @description Bypassess login requirement, removes paid feature buttons, removes blur from NSFW images, fixes CSS, and more...
// @grant       GM_addStyle
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Set the URL for redirection
    const subpageURL = 'https://www.chub.ai/characters?page=1&sort=last_activity_at&first=100';

    // Redirect to the subpage
    if (window.location.pathname === '/') {
        window.location.href = subpageURL;
    }

    // Define custom CSS
    const customCSS = `
        .nsfw-pixels-sm, .nsfw-pixels-lg, .nsfw-pixels-xs {
            -webkit-filter: none !important;
            filter: none !important;
            image-rendering: auto !important;
            padding: 0px !important;
            max-height: 600px;
        }
        .mb-4 {
            display: none !important;
        }
    `;

    // Add custom CSS styles to the webpage
    GM_addStyle(customCSS);

    // Function to hide elements with the class 'ant-btn' containing specific text
    function hideElements() {
        // Find all elements with class 'ant-btn'
        const elementsToHide = document.querySelectorAll('.ant-btn');

        // Loop through each element
        elementsToHide.forEach(element => {
            // Check if the element's text content contains 'text'
            if (element.textContent.includes('🔒')) {
                // Hide the element
                element.style.display = 'none';
            }
        });
    }

    // Observe changes to the DOM
    const observer = new MutationObserver(mutations => {
        mutations.forEach(mutation => {
            // Check if nodes were added
            if (mutation.addedNodes.length > 0) {
                // Call the function to hide elements
                hideElements();
            }
        });
    });

    // Start observing the entire document for changes
    observer.observe(document.documentElement, {
        childList: true,
        subtree: true
    });

    // Initially hide elements on page load
    hideElements();
})();