在C頁的使用者名稱後面新增「本板發文」按鈕,以快速查詢該使用者本板發文。
// ==UserScript==
// @name 巴哈姆特之查詢該使用者本看板發文
// @description 在C頁的使用者名稱後面新增「本板發文」按鈕,以快速查詢該使用者本板發文。
// @namespace nathan60107
// @version 1.2
// @author nathan60107(貝果)
// @homepage https://home.gamer.com.tw/homeindex.php?owner=nathan60107
// @match *forum.gamer.com.tw/C*
// @icon https://www.google.com/s2/favicons?domain=gamer.com.tw
// @run-at document-end
// @noframes
// ==/UserScript==
(function() {
let bsn = window.location.href.match(/.*(?<!sub)bsn=(\d+).*/)[1]
for(let user of jQuery(".c-post__header__author")){
let uid = jQuery(user).find(".userid")[0].innerText
jQuery(user).append(`
<a class="floor tippy-gpbp" data-tooltipped="" data-original-title="本板發文" href="https://forum.gamer.com.tw/Bo.php?bsn=${bsn}&qt=6&q=${uid}">
本板發文
</a>
`)
}
})();