From 3d388aa58e12d47f756eb45d4cb7ca7295c3bdab Mon Sep 17 00:00:00 2001 From: xing Date: Wed, 25 Mar 2020 23:03:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A5=BC=E4=B8=AD=E6=A5=BC=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tieba page.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tieba page.js b/tieba page.js index 5422c57..b4a5f09 100644 --- a/tieba page.js +++ b/tieba page.js @@ -1,7 +1,7 @@ // ==UserScript== // @name tieba page // @namespace https://github.com/fthvgb1/tampermonkey-script -// @version 0.93 +// @version 0.94 // @author fthvgb1 // @match https://tieba.baidu.com/* // @match http://tieba.baidu.com/* @@ -166,8 +166,9 @@ return; } let uuu = li.querySelector('.left>div .user_name'); + let ct = li.querySelector('.user_name + p').innerText; let username = uuu.outerHTML; - username = username.replace('', ':').replace('javascript:;', `/home/main?un=${uuu.innerText.replace(/ /g, '')}`); + username = username.replace('', ` : ${ct}`).replace('javascript:;', `/home/main?un=${uuu.innerText.replace(/ /g, '')}`); let s = li.querySelector('.content span'); s.className = 'floor_content'; let c = li.querySelector('.content').innerHTML; @@ -203,8 +204,9 @@ lii.forEach(function (li, index) { let uuu = li.querySelector('.left>div .user_name'); + let ct = li.querySelector('.user_name + p').innerText; let username = uuu.outerHTML; - username = username.replace('', ':').replace('javascript:;', `/home/main?un=${uuu.innerText.replace(/ /g, '')}`); + username = username.replace('', ` : ${ct}`).replace('javascript:;', `/home/main?un=${uuu.innerText.replace(/ /g, '')}`); let s = li.querySelector('.content span'); s.className = 'floor_content'; let c = li.querySelector('.content').innerHTML;