改变pku树洞网页版显示

隐藏评论,居中显示(V1.1:优化实现方式,修复失效问题)

// ==UserScript==
// @name         改变pku树洞网页版显示
// @namespace    [email protected]
// @version      1.1
// @description  隐藏评论,居中显示(V1.1:优化实现方式,修复失效问题)
// @author       nicolas
// @match        https://pkuhelper.pku.edu.cn/hole/
// @grant        GM_addStyle
// @license MIT
// ==/UserScript==

GM_addStyle(".flow-item-row {display:flex;justify-content: center;}");
GM_addStyle(".flow-item {display:flex;justify-content: center;}");
GM_addStyle(".box {margin:10 auto}");
setInterval(function() {
    'use strict';
    var aEle = document.getElementsByTagName('*');
    for(var i=0;i<aEle.length;i++){
        if(aEle[i].className == "flow-reply-row"){
            aEle[i].parentNode.removeChild(aEle[i]);
        }
    }
}, 100);