Greasy Fork

Greasy Fork is available in English.

Tieba百度贴吧回复楼主标识

在贴吧楼层回复者中标识出楼主

目前为 2017-05-26 提交的版本。查看 最新版本

// ==UserScript==
// @name         Tieba百度贴吧回复楼主标识
// @namespace    http://nickdoth.cc/
// @version      0.1.3
// @description  在贴吧楼层回复者中标识出楼主
// @author       nickdoth
// @match        http://tieba.baidu.com/p/*
// @match        https://tieba.baidu.com/p/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // Sheet
    var styleEl = document.createElement('style');
    document.head.appendChild(styleEl);
    var sheet = styleEl.sheet;
    
    sheet.insertRule(`a.at.j_user_card[username="${PageData.thread.author}"]:after { 
        content: "楼主";
        background: #17a;
        color: #fff;
        border: 1px #fff solid;
        border-radius: 5px;
        padding: 2px 4px;
    }`, 0);
})();