Greasy Fork

来自缓存

禁止水帖

禁止在洛谷打开灌水区帖子

// ==UserScript==
// @name         禁止水帖
// @namespace    mailto:[email protected]
// @version      0.1
// @description  禁止在洛谷打开灌水区帖子
// @author       OI-Master
// @match        https://www.luogu.com.cn/discuss/show/*
// @icon         https://www.google.com/s2/favicons?domain=luogu.com.cn
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    if($(".colored").text()=="灌水区"){
        setTimeout(function(){
            $('.lg-content-left').html('<section class="am-panel am-panel-default lg-summary"><br>说好的不水帖的呢……好好学习!<br><br></section>');
            $('.lfe-h1').text('禁止水帖 - 三秒后回到上一页');
            $('title').text('禁止水帖!');
        },500);
        setTimeout("window.history.go(-1)", 3500);
    }
})();