Greasy Fork is available in English.

fuck-ugg

删除UGG页面中倒胃口的垃圾信息

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         fuck-ugg
// @namespace    http://*/
// @namespace    https://*/
// @version      1.3
// @description  删除UGG页面中倒胃口的垃圾信息
// @author       fuck-ugg
// @license      AGPL License
// @include      https://www.uu-gg.one/*
// @run-at       document-start
// @grant        GM_addStyle
// ==/UserScript==

(function() {
    'use strict';

    /////////////////////////////////////////////////////////////////////////////
    // 狗叫禁声 /////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////

    // 关闭傻逼设置的每日一弹
    const tms = new Date().getTime();
    localStorage.setItem('modalLastShown', tms);

    // 关闭置垃圾恶心置顶贴
    const ids = "[2206,108116,96060,77813,76301,3090,2646,55832]";
    localStorage.setItem('Discuz_sticktids', ids);

    // 关闭顶部的垃圾提醒,全是垃圾恶心人的信息
    GM_addStyle('.a_ugg_mu{display:none !important}');

    // 关闭滚动垃圾信息,全是垃圾恶心人的信息
    GM_addStyle('#toptable{display:none !important}');

    // 关闭喇叭,全是垃圾恶心人的信息
    GM_addStyle('#laba{display:none !important}');
    // 删除发贴页面的垃圾提示
    GM_addStyle("#wolfcodepostwarn_div .wolfcodepostwarn_text>div:not(:first-child){display:none !important}");

    window.addEventListener("DOMContentLoaded", () => {
        // 关闭傻逼设置的发贴警告,点回复直接发贴
        unsafeWindow.confirmSubmit = function (content, formId) {
            return true;
        }

        // 删除发贴页面的垃圾提示
        const st = document.getElementById("scrolling-table");
        if (st) st.style.display = 'none';

         const lj = document.getElementById('wolfcodepostwarn_div');
        if (lj) {
            const ds = lj.querySelectorAll('.wolfcodepostwarn_text>div');
            if (ds) {
                ds.forEach(function(d, i){
                    if (i > 0) {d.style.display = "none"} else {
                        d.querySelectorAll('div').forEach(function(d){
                            if (d.textContent.includes('封') || d.textContent.includes('违规') || d.textContent.includes('---')|| d.textContent.includes('垃圾')) {
                                d.style.display = 'none';
                            }
                        });
                    }
                })
            }
        }


        // 删除发贴输入框中的垃圾恶心人的提示
        const as = document.querySelectorAll("textarea,input")
        if (as) {
            as.forEach(function(a, i){
                a.placeholder = "请输入内容";
            })
        }

        // 删除每个帖子底部垃圾恶心人的封号提示
        const signs = document.querySelectorAll(".sign");
        if (signs){
            signs.forEach(function(d, i){
                if (d.textContent.includes('封号提醒')) {
                    d.style.display = 'none';
                }
            });
        }
    })

})();