有没有办法隐藏已查看列?

太好了,这很有用。

编辑: 我将其更改为以下内容,以使其不区分大小写:

<script type="text/discourse-plugin" version="1.4.0">
    function shouldHideLastSeen() {
        const p = location.pathname.toLowerCase();
        return p === "/u/username" || p.startsWith("/u/username/");
    }

    function hideLastSeen() {
        if (shouldHideLastSeen()) {
            document.querySelectorAll(".last-seen-at").forEach(el => el.remove());
        }
    }

    api.onPageChange(hideLastSeen);
    document.addEventListener("DOMContentLoaded", hideLastSeen);
</script>
1 个赞