Late 2020 Roblox Ban Screen Script

Fixes the hideous new Roblox ban screen.

ของเมื่อวันที่ 18-07-2024 ดู เวอร์ชันล่าสุด

// ==UserScript==
// @name         Late 2020 Roblox Ban Screen Script
// @namespace    https://greasyfork.org/en/scripts/499330-late-2020-roblox-ban-screen-script
// @version      1.24
// @license      GNU GPLv3
// @description  Fixes the hideous new Roblox ban screen.
// @author       boiby
// @match        https://www.roblox.com/not-approved*
// @match        https://www.roblox.com/fr/not-approved*
// @match        https://usermoderation.roblox.com/v1/not-approved*
// @grant        GM_xmlhttpRequest
// ==/UserScript==

(function() {
    'use strict';
    const style = `
        .not-approved-page-web-app-root .not-approved-content-container {
            width: 800px;
            padding: 15px !important;
        }
        .not-approved-page-web-app-root {
            margin-top: 4%;
        }
        .chat-container {
            display: none;
        }
        .light-theme {
            color: #606162;
            text-rendering: auto;
        }
        .not-approved-page-web-app-root .not-approved-content-container .not-approved-title {
            font-weight: 400 !important;
            margin-bottom: 16px !important;
            margin-top: 6px !important;
        }
        .content {
            margin-top: 0 auto!important;
        }
        footer {
            display:none;
        }
        @media (max-width: 543px) {
          .builder-font div {
             font-size: 16px;
             font-weight: 400;
             line-height: 1.5em !important;
          }
          .content {
             padding-top: 0px;
          }
        }
        h1,
        h2,
        h3,
        h4,
        h5 {
            line-height: 1.4em !important;
            margin: 0 !important;
            margin-bottom: 0px !important;
            padding: 5px 0 !important;
        }
        .not-approved-page-web-app-root .not-approved-content-container .not-approved-action-section .not-approved-action-section-children a:visited {
            color: #32B5FF !important;
        }
        .not-approved-page-web-app-root .not-approved-content-container .not-approved-action-section .not-approved-action-section-children a {
            color: #528bff !important;
        }
        .not-approved-page-web-app-root .not-approved-content-container .not-approved-action-section .not-approved-action-section-children {
            padding: 12px !important;
            margin-top: 6px !important;
            margin-bottom: -16px !important;
            align-items: center;
        }
        .not-approved-page-web-app-root .not-approved-content-container .not-approved-action-section .not-approved-action-section-children[data-testid="logout-button"] {
            margin-top: 8px !important;
            margin-bottom: 17px !important;
            align-items: center;
            margin-left: auto;
            margin-right: auto;
        }
        .not-approved-page-web-app-root .not-approved-content-container .not-approved-action-section .not-approved-action-section-children[data-testid="logout-button"] button {
            width: 90px!important;
            border: 1px solid;
        }
        .dark-theme .not-approved-page-web-app-root .not-approved-content-container .not-approved-info-section {
            font-weight: 300 !important;
            color: #ffffff !important;
        }
        .light-theme .not-approved-page-web-app-root .not-approved-content-container .not-approved-info-section {
            font-weight: 300 !important;
            color: #000000 !important;
        }
        .light-theme .btn-control-md:hover {
            background-color: transparent;
            border-color: #393b3d;
            color: #393b3d;
        }
        .builder-font .font-body,
        .builder-font .text-description,
        .builder-font .text-favorite,
        .builder-font p {
            font-weight: 300 !important;
        }
        p div {
            font-weight: 300 !important;
        }
        .builder-font strong {
            font-weight: 600 !important;
        }
        p {
            line-height: 1.5em !important;
            margin-right: 2px !important;
        }
        p.text-footer {
            font-size: 10px !important;
            font-weight: 400 !important;
        }
        .not-approved-checkbox-text {
            font-weight: 400 !important;
        }
        @media (max-width: 991px) {
    .not-approved-title {
        font-size: 20px!important;
    }
    .not-approved-content-container {
        min-width: 100%!important;
    }
    p, strong, b {
        font-size: 16px!important;
    }}
    `;
    const styleElement = document.createElement('style');
    styleElement.type = 'text/css';
    styleElement.appendChild(document.createTextNode(style));
    document.head.appendChild(styleElement);
})();
(function() {
    'use strict';
    function applyStylesAndHideElements() {
        document.querySelectorAll('.not-approved-title[data-testid="main-page-title"]').forEach(function(element) {
            if (element.textContent.trim() === 'Account Deleted' ||
                element.textContent.trim() === 'Compte supprimé') {
                const guidelines = document.querySelector('p[data-testid="community-guidelines"]');
                if (guidelines) {
                    guidelines.style.display = 'none';
                }
            }
        });
    }
    window.addEventListener('load', applyStylesAndHideElements);
    const observer = new MutationObserver(applyStylesAndHideElements);
    observer.observe(document.body, { childList: true, subtree: true });
})();
(function() {
    'use strict';
    function replaceBannedText() {
        let elements = document.querySelectorAll('.not-approved-title');
        elements.forEach(function(element) {
            if (element.textContent.trim() === 'Banned for 6 Months') {
                element.textContent = 'Banned for 183 Days';
            }
        });
        elements.forEach(function(element) {
            if (element.textContent.trim() === 'Banned for 1 Year') {
                element.textContent = 'Banned for 365 Days';
            }
        });
    }
    replaceBannedText();
    const observer = new MutationObserver(function(mutations) {
        mutations.forEach(function(mutation) {
            replaceBannedText();
        });
    });
    observer.observe(document.body, { childList: true, subtree: true });
})();
(function() {
    'use strict';

    const url = 'https://usermoderation.roblox.com/v1/not-approved';

    GM_xmlhttpRequest({
        method: "GET",
        url: url,
        onload: function(response) {
            if (response.status === 200) {
                try {
                    const data = JSON.parse(response.responseText);
                    console.log('Fetched data:', data);

                    // Check if any badUtterance matches specific abuse types
                    const badUtterances = data.badUtterances || [];
                    badUtterances.forEach(utterance => {
                        switch (utterance.abuseType) {
                            case 'ABUSE_TYPE_TERRORISM_EXTREMISM':
                                updateReasonText("Terrorism/Extremism");
                                break;
                            case 'ABUSE_TYPE_ILLEGAL_AND_REGULATED_CONTENT':
                                updateReasonText("Illegal and Regulated Content");
                                break;
                            case 'ABUSE_TYPE_POLITICAL_CONTENT':
                                updateReasonText("Political Content");
                                break;
                            case 'ABUSE_TYPE_REAL_LIFE_THREATS':
                                updateReasonText("Real-Life Threats");
                                break;
                            case 'ABUSE_TYPE_REAL_LIFE_TRAGEDY':
                                updateReasonText("Real-Life Tragedy");
                                break;
                            case 'ABUSE_TYPE_IMPERSONATION':
                                updateReasonText("Impersonation");
                                break;
                            default:
                                break;
                        }
                    });

                } catch (e) {
                    console.error('Failed to parse JSON:', e);
                }
            } else {
                console.error('Failed to fetch data. Status:', response.status);
            }
        },
        onerror: function(error) {
            console.error('Request error:', error);
        }
    });
    function updateReasonText(newText) {
        const elements = document.querySelectorAll('div.not-approved-punishment-details-item > p:nth-child(1) > strong:nth-child(1)');
        elements.forEach(element => {
            element.textContent = newText;
        });
    }
})();
// made by boiby