This commit is contained in:
xing 2020-05-07 12:30:55 +08:00
parent f9c5ad6e7c
commit a950684b16

View File

@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name tieba page // @name tieba page
// @namespace http://tampermonkey.net/ // @namespace http://tampermonkey.net/
// @version 1.005 // @version 1.006
// @author fthvgb1 // @author fthvgb1
// @match https://tieba.baidu.com/* // @match https://tieba.baidu.com/*
// @match https://tiebac.baidu.com/* // @match https://tiebac.baidu.com/*
@ -256,7 +256,8 @@
as.forEach(a => { as.forEach(a => {
let src = a.href; let src = a.href;
if (src.search(/(fr=share)|(client_type=2)/) > -1) { if (src.search(/(fr=share)|(client_type=2)/) > -1) {
let href = src.match(/(https?:\/\/tieba\.baidu\.com\/p\/\d+?)/);
let href = src.match(/(https?:\/\/tieba\.baidu\.com\/p\/\d+)/);
if (href && href.length > 0) { if (href && href.length > 0) {
a.href = href[1]; a.href = href[1];
a.innerText = a.href; a.innerText = a.href;