Greasy Fork

Greasy Fork is available in English.

洛谷假装禁言

在洛谷,想体验加强版学术之禁言?试试用油猴假装禁言

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         洛谷假装禁言
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  在洛谷,想体验加强版学术之禁言?试试用油猴假装禁言
// @author       xiaolan16
// @match        https://www.luogu.com.cn/
// @match        https://www.luogu.com.cn/discuss/lists?forumname=*
// @match        https://www.luogu.com.cn/discuss/show/*
// @grant        GM_setValue
// @grant        GM_getValue
// ==/UserScript==

(function() {
    'use strict';
    var jinyan_benben=0;
    function whatever1(){
        $(this).addClass("am-disabled");
        show_alert("好像哪里有点问题", "已被禁言");
    }
    function whatever2(){
        $(this).addClass("am-disabled");
        show_alert("好像哪里有点问题", "您已被禁言");
    }
    if(window.location.href=="https://www.luogu.com.cn/"&&jinyan_benben){
        $('#feed-submit').unbind();
        for(let i=0;i<=10;i++){
            if(document.getElementsByClassName("am-btn am-btn-danger am-btn-sm")[i].id=='feed-submit'){
                document.getElementsByClassName("am-btn am-btn-danger am-btn-sm")[i].onclick=function(){whatever1();};
            }
        }
    }
    if(window.location.href=="https://www.luogu.com.cn/discuss/lists"||window.location.href.startsWith("https://www.luogu.com.cn/discuss/lists?forumname=")){
        $('#submitpost').unbind();
        for(let i=0;i<=10;i++){
            if(document.getElementsByClassName("am-btn am-btn-danger")[i].id=='submitpost'){
                document.getElementsByClassName("am-btn am-btn-danger")[i].onclick=function(){whatever2();};
            }
        }
    }
    if(window.location.href.startsWith("https://www.luogu.com.cn/discuss/show/")){
        $('#submit-reply').unbind();
        for(let i=0;i<=10;i++){
            if(document.getElementsByClassName("am-btn am-btn-danger")[i].id=='submit-reply'){
                document.getElementsByClassName("am-btn am-btn-danger")[i].onclick=function(){whatever2();};
            }
        }
    }
})();