// ==UserScript== // @name 哔哩哔哩小尾巴 // @namespace https://bbs.tampermonkey.net.cn/ // @version 0.2 // @description 让你的评论带上小尾巴! // @author wyz // @match https://www.bilibili.com/video/* // @grant none // @supportURL https://bbs.tampermonkey.net.cn/forum.php?mod=viewthread&tid=431 // @homepage https://bbs.tampermonkey.net.cn/forum.php?mod=viewthread&tid=431 // ==/UserScript== let tail = "\n----臭水沟捞的奔腾机"; function hook(val) { let hookSendMsg = val.prototype._sendMsg; val.prototype._sendMsg = function (n, i, o) { i.msg += tail; hookSendMsg.apply(this, [n, i, o]); } return val; } if (window.bbComment) { hook(); } else { let v; Object.defineProperty(window, "bbComment", { get: () => { return v; }, set: (val) => { v = hook(val); } }); }