Greasy Fork

Greasy Fork is available in English.

Discuz!论坛备注用户备注

原脚本仅支持mcbbs,现脚本支持所有Discuz!论坛。

当前为 2019-11-21 提交的版本,查看 最新版本

// ==UserScript==
// @name         Discuz!论坛备注用户备注
// @version      0.4
// @include        */forum*
// @include        */viewthread.php*
// @include        */thread*
// @include        */redirect.php*
// @include        */bbs/forum*
// @include        */bbs/viewthread.php*
// @include        */bbs/thread*
// @include        */bbs/redirect.php*
// @author       原作者:xmdhs 修改:仙圣
// @description 原脚本仅支持mcbbs,现脚本支持所有Discuz!论坛。
// @namespace http://greasyfork.icu/users/76579
// ==/UserScript==
(function() {
    var setid = ["1","2"];//此处为用户的uid
    var note = ["这是备注","备注2"];
    var names = document.getElementsByClassName("xw1");
    for(var a=0; a<names.length; a++) {
       for(var n=0; n<setid.length; n++) {
        if (names[a].href == location.origin+"/home.php?mod=space&uid="+setid[n])
         {
            names[a].innerHTML += '<img src="https://i.loli.net/2019/11/09/Kjwi68ecyCmqaS2.png" class="vm" alt="备注" title="'+note[n]+'">';
         }
       }
    }
}
)();