Greasy Fork

改变pku树洞网页版显示

change view of pku hole!

目前为 2022-08-01 提交的版本。查看 最新版本

// ==UserScript==
// @name         改变pku树洞网页版显示
// @namespace    [email protected]
// @version      1.0
// @description  change view of pku hole!
// @author       nicolas
// @match        https://pkuhelper.pku.edu.cn/hole/
// @grant        none
// @license MIT
// ==/UserScript==

setInterval(function() {
    'use strict';
    var aEle = document.getElementsByTagName('*');
    for(var i=0;i<aEle.length;i++){
         if(aEle[i].className == "flow-item-row flow-item-row-with-prompt" || aEle[i].className == "flow-item-row flow-item-row-with-prompt flow-item-row-quote"){
            aEle[i].style.display="flex";
        }
        if(aEle[i].className == "flow-item" || aEle[i].className == "flow-item flow-item-quote"){
            aEle[i].style.margin="0 auto";
        }
        if(aEle[i].className == "flow-reply-row"){
            aEle[i].parentNode.removeChild(aEle[i]);
        }
    }
}, 100);